@tap-payments/os-micro-frontend-shared 0.1.404 → 0.1.405
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.
|
@@ -26,9 +26,10 @@ function SelectWithSearch({ options, onChangeOption, selectedOption, placeholder
|
|
|
26
26
|
if (!searchValue)
|
|
27
27
|
return options;
|
|
28
28
|
return options.filter((option) => {
|
|
29
|
-
var _a;
|
|
30
|
-
const
|
|
31
|
-
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const optionLabel = (_a = option === null || option === void 0 ? void 0 : option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
31
|
+
const optionValue = (_b = option === null || option === void 0 ? void 0 : option.value) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
32
|
+
return (optionLabel === null || optionLabel === void 0 ? void 0 : optionLabel.includes(searchValue.toLowerCase())) || (optionValue === null || optionValue === void 0 ? void 0 : optionValue.includes(searchValue.toLowerCase()));
|
|
32
33
|
});
|
|
33
34
|
}, [options, searchValue]);
|
|
34
35
|
const startAdornment = useMemo(() => (_jsx(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', maxWidth: 16 } }, { children: _jsx(Box, { component: "img", src: iconUrl, alt: "icon", sx: { maxWidth: 12, height: 12 } }) }))), [iconUrl]);
|
package/package.json
CHANGED