x-ui-design 0.3.20 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +3 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/lib/components/Select/Select.tsx +1 -8
- package/package.json +1 -1
- package/src/app/page.tsx +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -2979,7 +2979,7 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
|
|
|
2979
2979
|
const asMultiple = mode === 'multiple';
|
|
2980
2980
|
const hasMode = asTag || asMultiple;
|
|
2981
2981
|
const initialValue = useMemo(() => value || defaultValue || '', [value, defaultValue]);
|
|
2982
|
-
const checkModeInitialValue = useMemo(() => (!Array.isArray(initialValue) ? [initialValue] : initialValue).filter(e => e), [initialValue]);
|
|
2982
|
+
const checkModeInitialValue = useMemo(() => (!Array.isArray(initialValue) ? [initialValue] : initialValue).filter(e => e !== undefined), [initialValue]);
|
|
2983
2983
|
const [isHover, setIsHover] = useState(false);
|
|
2984
2984
|
const selectRef = useRef(null);
|
|
2985
2985
|
const [searchInputWidth, setSearchInputWidth] = useState(0);
|
|
@@ -3317,17 +3317,13 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
|
|
|
3317
3317
|
value: tag,
|
|
3318
3318
|
onClose: handleRemoveTag,
|
|
3319
3319
|
closable: true
|
|
3320
|
-
})) : /*#__PURE__*/React$1.createElement(
|
|
3321
|
-
extractedOptions,
|
|
3322
|
-
tag,
|
|
3323
|
-
placeholder
|
|
3324
|
-
}), /*#__PURE__*/React$1.createElement(Tag, {
|
|
3320
|
+
})) : /*#__PURE__*/React$1.createElement(Tag, {
|
|
3325
3321
|
closable: true,
|
|
3326
3322
|
value: tag,
|
|
3327
3323
|
label: tag === '' ? placeholder : extractedOptions.find(e => e.value === tag)?.children || tag,
|
|
3328
3324
|
onClose: handleRemoveTag,
|
|
3329
3325
|
key: `${index}_${tag}`
|
|
3330
|
-
}))
|
|
3326
|
+
})), isOpen ? /*#__PURE__*/React$1.createElement("div", {
|
|
3331
3327
|
className: `${prefixCls}-tag`
|
|
3332
3328
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
3333
3329
|
onClick: e => {
|