@chekinapp/ui 0.0.120 → 0.0.121
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.cjs +21 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -11
- package/dist/index.d.ts +7 -11
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14675,6 +14675,7 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14675
14675
|
filterOption: userFilterOption,
|
|
14676
14676
|
components: userComponents,
|
|
14677
14677
|
onInputChange: userOnInputChange,
|
|
14678
|
+
isMulti = false,
|
|
14678
14679
|
...rest
|
|
14679
14680
|
} = props;
|
|
14680
14681
|
const isPaginated = canLoadMore !== void 0 || isLoadingMore !== void 0 || loadMoreItems !== void 0 || onSearchChange !== void 0 || getFullSearchOption !== void 0;
|
|
@@ -14683,8 +14684,8 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14683
14684
|
const filteredOptions = React52.useMemo(() => {
|
|
14684
14685
|
const trimmed = inputValue.trim();
|
|
14685
14686
|
const valueLabel = (() => {
|
|
14686
|
-
if (
|
|
14687
|
-
const single =
|
|
14687
|
+
if (isMulti) return "";
|
|
14688
|
+
const single = rest.value;
|
|
14688
14689
|
if (!single) return "";
|
|
14689
14690
|
return rest.getValueLabel?.(single) ?? String(single.label);
|
|
14690
14691
|
})();
|
|
@@ -14698,7 +14699,7 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14698
14699
|
if (synthetic) list = [synthetic, ...list];
|
|
14699
14700
|
}
|
|
14700
14701
|
return list;
|
|
14701
|
-
}, [rawOptions, inputValue, filterOption, getFullSearchOption,
|
|
14702
|
+
}, [rawOptions, inputValue, filterOption, getFullSearchOption, isMulti, rest]);
|
|
14702
14703
|
const contextValue = React52.useMemo(
|
|
14703
14704
|
() => ({
|
|
14704
14705
|
canLoadMore,
|
|
@@ -14733,16 +14734,27 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14733
14734
|
},
|
|
14734
14735
|
[onSearchChange, userOnInputChange]
|
|
14735
14736
|
);
|
|
14736
|
-
|
|
14737
|
+
const selectExtras = {
|
|
14738
|
+
options: filteredOptions,
|
|
14739
|
+
filterOption: passthroughFilter,
|
|
14740
|
+
components,
|
|
14741
|
+
onInputChange: handleInputChange
|
|
14742
|
+
};
|
|
14743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(InfiniteScrollContext.Provider, { value: contextValue, children: isMulti ? /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
|
|
14737
14744
|
Select,
|
|
14738
14745
|
{
|
|
14739
14746
|
ref,
|
|
14740
14747
|
...rest,
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
|
|
14748
|
+
...selectExtras,
|
|
14749
|
+
isMulti: true
|
|
14750
|
+
}
|
|
14751
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
|
|
14752
|
+
Select,
|
|
14753
|
+
{
|
|
14754
|
+
ref,
|
|
14755
|
+
...rest,
|
|
14756
|
+
...selectExtras,
|
|
14757
|
+
isMulti: false
|
|
14746
14758
|
}
|
|
14747
14759
|
) });
|
|
14748
14760
|
}
|