myoperator-mcp 0.2.365 → 0.2.366
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.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8294,6 +8294,8 @@ export interface SearchFilterProps
|
|
|
8294
8294
|
searchPlaceholder?: string;
|
|
8295
8295
|
/** Search input behavior. Defaults to "numeric" for phone-number filtering. */
|
|
8296
8296
|
searchMode?: SearchFilterSearchMode;
|
|
8297
|
+
/** Minimum query length before internal option filtering runs. Below it, all options are shown. Defaults to 0. */
|
|
8298
|
+
minSearchLength?: number;
|
|
8297
8299
|
/** Message shown when filtering returns no options */
|
|
8298
8300
|
emptyMessage?: string;
|
|
8299
8301
|
/** Disables the whole filter */
|
|
@@ -8321,6 +8323,7 @@ const SearchFilter = React.forwardRef<HTMLDivElement, SearchFilterProps>(
|
|
|
8321
8323
|
onSearchChange,
|
|
8322
8324
|
searchPlaceholder = "Search...",
|
|
8323
8325
|
searchMode = "numeric",
|
|
8326
|
+
minSearchLength = 0,
|
|
8324
8327
|
emptyMessage = "No options found",
|
|
8325
8328
|
disabled = false,
|
|
8326
8329
|
searchDisabled = false,
|
|
@@ -8457,6 +8460,7 @@ const SearchFilter = React.forwardRef<HTMLDivElement, SearchFilterProps>(
|
|
|
8457
8460
|
}, [isOpen, refs.floating, setOpen]);
|
|
8458
8461
|
|
|
8459
8462
|
const filteredOptions = React.useMemo(() => {
|
|
8463
|
+
if (normalizedSearchQuery.length < minSearchLength) return options;
|
|
8460
8464
|
if (!normalizedSearchQuery) return options;
|
|
8461
8465
|
|
|
8462
8466
|
return options.filter((option) =>
|
|
@@ -8464,7 +8468,7 @@ const SearchFilter = React.forwardRef<HTMLDivElement, SearchFilterProps>(
|
|
|
8464
8468
|
normalizedSearchQuery
|
|
8465
8469
|
)
|
|
8466
8470
|
);
|
|
8467
|
-
}, [normalizedSearchQuery, options, searchMode]);
|
|
8471
|
+
}, [normalizedSearchQuery, options, searchMode, minSearchLength]);
|
|
8468
8472
|
|
|
8469
8473
|
const selectOption = React.useCallback(
|
|
8470
8474
|
(option: SearchFilterOption) => {
|
package/package.json
CHANGED