Skip to content

Commit f4ada6b

Browse files
authored
fix: dom order (#799)
1 parent baba2fb commit f4ada6b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/PickerInput/Selector/SingleSelector/MultipleDates.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,22 @@ export interface MultipleDatesProps<DateType extends object = any>
1111
removeIcon?: React.ReactNode;
1212
formatDate: (date: DateType) => string;
1313
disabled?: boolean;
14+
placeholder?: React.ReactNode;
1415
}
1516

1617
export default function MultipleDates<DateType extends object = any>(
1718
props: MultipleDatesProps<DateType>,
1819
) {
19-
const { prefixCls, value, onRemove, removeIcon = '×', formatDate, disabled, maxTagCount } = props;
20+
const {
21+
prefixCls,
22+
value,
23+
onRemove,
24+
removeIcon = '×',
25+
formatDate,
26+
disabled,
27+
maxTagCount,
28+
placeholder,
29+
} = props;
2030

2131
const selectorCls = `${prefixCls}-selector`;
2232
const selectionCls = `${prefixCls}-selection`;
@@ -76,6 +86,7 @@ export default function MultipleDates<DateType extends object = any>(
7686
itemKey={(date) => formatDate(date)}
7787
maxCount={maxTagCount}
7888
/>
89+
{!value.length && <span className={`${prefixCls}-selection-placeholder`}>{placeholder}</span>}
7990
</div>
8091
);
8192
}

src/PickerInput/Selector/SingleSelector/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ function SingleSelector<DateType extends object = any>(
170170
maxTagCount={maxTagCount}
171171
disabled={disabled}
172172
removeIcon={removeIcon}
173+
placeholder={placeholder}
173174
/>
174-
{!value.length && <span className={`${prefixCls}-selection-placeholder`}>{placeholder}</span>}
175175
<input
176176
className={`${prefixCls}-multiple-input`}
177177
value={value.map(getText).join(',')}

0 commit comments

Comments
 (0)