@sproutsocial/seeds-react-menu 1.11.8 → 1.11.9

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.
@@ -88,6 +88,7 @@ interface SingleComboboxBaseProps {
88
88
  placeholder?: string;
89
89
  emptyText?: string;
90
90
  disabled?: boolean;
91
+ filter?: ((item: unknown, query: string) => boolean) | null;
91
92
  }
92
93
  interface SingleComboboxDataBaseProps<T extends DataWithId> extends SingleComboboxBaseProps {
93
94
  data: T[];
@@ -132,6 +133,7 @@ interface MultiComboboxBaseProps {
132
133
  isLoading?: boolean;
133
134
  loadingText?: string;
134
135
  disabled?: boolean;
136
+ filter?: ((item: unknown, query: string) => boolean) | null;
135
137
  }
136
138
  interface MultiComboboxDataProps<T extends DataWithId> extends MultiComboboxBaseProps {
137
139
  data: T[];
@@ -181,6 +183,7 @@ interface SingleSearchableSelectBaseProps {
181
183
  isLoading?: boolean;
182
184
  loadingText?: string;
183
185
  disabled?: boolean;
186
+ filter?: ((item: unknown, query: string) => boolean) | null;
184
187
  }
185
188
  interface SingleSearchableSelectDataBaseProps<T extends DataWithId> extends SingleSearchableSelectBaseProps {
186
189
  data: T[];
@@ -228,6 +231,7 @@ interface MultiSearchableSelectBaseProps {
228
231
  isLoading?: boolean;
229
232
  loadingText?: string;
230
233
  disabled?: boolean;
234
+ filter?: ((item: unknown, query: string) => boolean) | null;
231
235
  }
232
236
  interface MultiSearchableSelectDataProps<T extends DataWithId> extends MultiSearchableSelectBaseProps {
233
237
  data: T[];
@@ -88,6 +88,7 @@ interface SingleComboboxBaseProps {
88
88
  placeholder?: string;
89
89
  emptyText?: string;
90
90
  disabled?: boolean;
91
+ filter?: ((item: unknown, query: string) => boolean) | null;
91
92
  }
92
93
  interface SingleComboboxDataBaseProps<T extends DataWithId> extends SingleComboboxBaseProps {
93
94
  data: T[];
@@ -132,6 +133,7 @@ interface MultiComboboxBaseProps {
132
133
  isLoading?: boolean;
133
134
  loadingText?: string;
134
135
  disabled?: boolean;
136
+ filter?: ((item: unknown, query: string) => boolean) | null;
135
137
  }
136
138
  interface MultiComboboxDataProps<T extends DataWithId> extends MultiComboboxBaseProps {
137
139
  data: T[];
@@ -181,6 +183,7 @@ interface SingleSearchableSelectBaseProps {
181
183
  isLoading?: boolean;
182
184
  loadingText?: string;
183
185
  disabled?: boolean;
186
+ filter?: ((item: unknown, query: string) => boolean) | null;
184
187
  }
185
188
  interface SingleSearchableSelectDataBaseProps<T extends DataWithId> extends SingleSearchableSelectBaseProps {
186
189
  data: T[];
@@ -228,6 +231,7 @@ interface MultiSearchableSelectBaseProps {
228
231
  isLoading?: boolean;
229
232
  loadingText?: string;
230
233
  disabled?: boolean;
234
+ filter?: ((item: unknown, query: string) => boolean) | null;
231
235
  }
232
236
  interface MultiSearchableSelectDataProps<T extends DataWithId> extends MultiSearchableSelectBaseProps {
233
237
  data: T[];
package/dist/v3/index.js CHANGED
@@ -1327,7 +1327,8 @@ function SingleCombobox(props) {
1327
1327
  const {
1328
1328
  id,
1329
1329
  placeholder = "Search...",
1330
- emptyText = "No results found."
1330
+ emptyText = "No results found.",
1331
+ filter
1331
1332
  } = props;
1332
1333
  const isChildrenMode = "children" in props && props.children != null;
1333
1334
  const data = isChildrenMode ? [] : props.data;
@@ -1381,6 +1382,7 @@ function SingleCombobox(props) {
1381
1382
  items: isVirtualized ? data : groups ?? (isChildrenMode ? void 0 : data),
1382
1383
  virtualized: isVirtualized,
1383
1384
  disabled: props.disabled,
1385
+ filter,
1384
1386
  open,
1385
1387
  onOpenChange: setOpen,
1386
1388
  onItemHighlighted: isVirtualized ? (item, { reason, index }) => {
@@ -1495,7 +1497,8 @@ function MultiCombobox(props) {
1495
1497
  placeholder = "Search...",
1496
1498
  emptyText = "No results found.",
1497
1499
  isLoading = false,
1498
- loadingText = "Loading..."
1500
+ loadingText = "Loading...",
1501
+ filter
1499
1502
  } = props;
1500
1503
  const isChildrenMode = "children" in props && props.children != null;
1501
1504
  const data = isChildrenMode ? [] : props.data;
@@ -1651,6 +1654,7 @@ function MultiCombobox(props) {
1651
1654
  open,
1652
1655
  disabled: props.disabled,
1653
1656
  onOpenChange: setOpen,
1657
+ filter,
1654
1658
  onItemHighlighted: isVirtualized ? (item, { reason, index }) => {
1655
1659
  const virt = virtualizerRef.current;
1656
1660
  if (!item || !virt) return;
@@ -1803,7 +1807,8 @@ function SingleSearchableSelect(props) {
1803
1807
  searchPlaceholder = "Search...",
1804
1808
  emptyText = "No results found.",
1805
1809
  isLoading = false,
1806
- loadingText = "Loading..."
1810
+ loadingText = "Loading...",
1811
+ filter
1807
1812
  } = props;
1808
1813
  const isChildrenMode = "children" in props && props.children != null;
1809
1814
  const data = isChildrenMode ? [] : props.data;
@@ -1862,6 +1867,7 @@ function SingleSearchableSelect(props) {
1862
1867
  },
1863
1868
  items: isVirtualized ? includePlaceholderItem ? [makePlaceholderSentinel(placeholder), ...data] : data : groups ?? (isChildrenMode ? void 0 : data),
1864
1869
  virtualized: isVirtualized,
1870
+ filter,
1865
1871
  open,
1866
1872
  onOpenChange: setOpen,
1867
1873
  onItemHighlighted: isVirtualized ? (item, { reason, index }) => {
@@ -2000,7 +2006,8 @@ function MultiSearchableSelect(props) {
2000
2006
  searchPlaceholder = "Search...",
2001
2007
  emptyText = "No results found.",
2002
2008
  isLoading = false,
2003
- loadingText = "Loading..."
2009
+ loadingText = "Loading...",
2010
+ filter
2004
2011
  } = props;
2005
2012
  const isChildrenMode = "children" in props && props.children != null;
2006
2013
  const data = isChildrenMode ? [] : props.data;
@@ -2148,6 +2155,7 @@ function MultiSearchableSelect(props) {
2148
2155
  multiple: true,
2149
2156
  id,
2150
2157
  virtualized: isVirtualized,
2158
+ filter,
2151
2159
  open,
2152
2160
  disabled: props.disabled,
2153
2161
  onOpenChange: setOpen,