@sproutsocial/seeds-react-menu 1.6.3 → 1.6.4
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/esm/index.js +4 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +4 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Autocomplete/MultiAutocomplete.tsx +0 -8
package/dist/index.js
CHANGED
|
@@ -3830,8 +3830,8 @@ var MultiAutocomplete = ({
|
|
|
3830
3830
|
[selectedItems]
|
|
3831
3831
|
);
|
|
3832
3832
|
const getIsItemVisibleMulti = import_react22.default.useCallback(
|
|
3833
|
-
(item,
|
|
3834
|
-
return (showSelectedItemsInDropdown || !selectedItemIds[item.id]) && getIsItemVisible(item,
|
|
3833
|
+
(item, inputValue) => {
|
|
3834
|
+
return (showSelectedItemsInDropdown || !selectedItemIds[item.id]) && getIsItemVisible(item, inputValue);
|
|
3835
3835
|
},
|
|
3836
3836
|
[selectedItemIds, showSelectedItemsInDropdown, getIsItemVisible]
|
|
3837
3837
|
);
|
|
@@ -3882,7 +3882,7 @@ var MultiAutocomplete = ({
|
|
|
3882
3882
|
externalStateReducer
|
|
3883
3883
|
),
|
|
3884
3884
|
onStateChange(changes) {
|
|
3885
|
-
const { type, selectedItem: newSelectedItem, inputValue
|
|
3885
|
+
const { type, selectedItem: newSelectedItem, inputValue } = changes;
|
|
3886
3886
|
switch (type) {
|
|
3887
3887
|
// Add the selected item to the selected items list
|
|
3888
3888
|
case import_downshift7.useCombobox.stateChangeTypes.InputKeyDownEnter:
|
|
@@ -3899,19 +3899,12 @@ var MultiAutocomplete = ({
|
|
|
3899
3899
|
default:
|
|
3900
3900
|
break;
|
|
3901
3901
|
}
|
|
3902
|
-
if (
|
|
3902
|
+
if (inputValue !== void 0) updateFilteredItems({ inputValue });
|
|
3903
3903
|
onStateChange && onStateChange(changes);
|
|
3904
3904
|
},
|
|
3905
3905
|
...useComboboxProps
|
|
3906
3906
|
});
|
|
3907
|
-
const { isOpen, closeMenu, inputValue } = useComboboxReturnProps;
|
|
3908
3907
|
const { popoutProps: userPopoutProps } = useComboboxProps;
|
|
3909
|
-
import_react22.default.useEffect(() => {
|
|
3910
|
-
if (!inputValue) return;
|
|
3911
|
-
if (allMenuItems && hiddenItemsCount >= allMenuItems.length && isOpen) {
|
|
3912
|
-
closeMenu?.();
|
|
3913
|
-
}
|
|
3914
|
-
}, [hiddenItemsCount, allMenuItems?.length, isOpen, inputValue]);
|
|
3915
3908
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3916
3909
|
MenuRootComponent,
|
|
3917
3910
|
{
|