@rockshin/tao-ui 0.0.32 → 0.0.33
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.
|
@@ -65,7 +65,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
65
65
|
]);
|
|
66
66
|
const isOpenControlled = void 0 !== openProp;
|
|
67
67
|
const [openInternal, setOpenInternal] = useState(defaultOpen ?? false);
|
|
68
|
-
const
|
|
68
|
+
const requestedOpen = isOpenControlled ? openProp : openInternal;
|
|
69
69
|
const isSearchControlled = void 0 !== searchValueProp;
|
|
70
70
|
const [searchInternal, setSearchInternal] = useState('');
|
|
71
71
|
const search = isSearchControlled ? searchValueProp : searchInternal;
|
|
@@ -301,6 +301,8 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
301
301
|
const filteredFlatOptions = useMemo(()=>flattenLeafOptions(filteredOptions), [
|
|
302
302
|
filteredOptions
|
|
303
303
|
]);
|
|
304
|
+
const suppressEmptyTagsPopup = hasInlineSearch && 'tags' === mode && 0 === filteredFlatOptions.length && !notFoundContent && !loading && !popupRender;
|
|
305
|
+
const open = requestedOpen && !suppressEmptyTagsPopup;
|
|
304
306
|
const allowClearEnabled = !!allowClear;
|
|
305
307
|
const clearIcon = 'object' == typeof allowClear && allowClear.clearIcon || /*#__PURE__*/ jsx(CloseIcon, {});
|
|
306
308
|
const showClearBtn = allowClearEnabled && (isMultiple ? valueArray.length > 0 : !!value) && !resolvedDisabled;
|
package/package.json
CHANGED