@rafal.lemieszewski/tide-ui 0.29.0 → 0.29.1
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.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +18 -8
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -72850,14 +72850,24 @@ function oot({
|
|
|
72850
72850
|
);
|
|
72851
72851
|
}
|
|
72852
72852
|
function Ure({ filter: e, value: t, onChange: r, onReset: n }) {
|
|
72853
|
-
const [o, a] = y.useState(""), i = y.useMemo(() => t ? Array.isArray(t) ? t : [String(t)] : [], [t]), c = y.useMemo(() =>
|
|
72854
|
-
|
|
72855
|
-
|
|
72856
|
-
|
|
72857
|
-
|
|
72858
|
-
|
|
72859
|
-
|
|
72860
|
-
|
|
72853
|
+
const [o, a] = y.useState(""), i = y.useMemo(() => t ? Array.isArray(t) ? t : [String(t)] : [], [t]), c = y.useMemo(() => {
|
|
72854
|
+
if (e.groups)
|
|
72855
|
+
return o ? e.groups.map((d) => ({
|
|
72856
|
+
...d,
|
|
72857
|
+
options: d.options.filter(
|
|
72858
|
+
(u) => u.label.toLowerCase().includes(o.toLowerCase()) || u.children?.some(
|
|
72859
|
+
(p) => p.label.toLowerCase().includes(o.toLowerCase())
|
|
72860
|
+
)
|
|
72861
|
+
)
|
|
72862
|
+
})).filter((d) => d.options.length > 0) : e.groups;
|
|
72863
|
+
if (e.options) {
|
|
72864
|
+
const d = o ? e.options.filter(
|
|
72865
|
+
(u) => u.label.toLowerCase().includes(o.toLowerCase())
|
|
72866
|
+
) : e.options;
|
|
72867
|
+
return d.length > 0 ? [{ label: e.label, options: d }] : [];
|
|
72868
|
+
}
|
|
72869
|
+
return [];
|
|
72870
|
+
}, [e.groups, e.options, e.label, o]), s = (d) => {
|
|
72861
72871
|
if (e.type === "multiselect") {
|
|
72862
72872
|
const u = i.includes(d) ? i.filter((p) => p !== d) : [...i, d];
|
|
72863
72873
|
r(u.length > 0 ? u : void 0);
|