@megha-ui/react 1.2.359 → 1.2.360
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.
|
@@ -144,8 +144,17 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
144
144
|
const _options = isSort
|
|
145
145
|
? options
|
|
146
146
|
.sort((a, b) => (a.label > b.label ? 1 : -1))
|
|
147
|
-
.filter((option) =>
|
|
148
|
-
|
|
147
|
+
.filter((option) => {
|
|
148
|
+
console.log(option.label
|
|
149
|
+
.toLowerCase()
|
|
150
|
+
.includes(searchTerm.toLowerCase()), option.label, searchTerm);
|
|
151
|
+
return option.label
|
|
152
|
+
.toLowerCase()
|
|
153
|
+
.includes(searchTerm.toLowerCase());
|
|
154
|
+
})
|
|
155
|
+
: options.filter((option) => {
|
|
156
|
+
return option.label.toLowerCase().includes(searchTerm.toLowerCase());
|
|
157
|
+
});
|
|
149
158
|
console.log(options);
|
|
150
159
|
setFilteredOptions(options);
|
|
151
160
|
const grouped = [];
|
package/package.json
CHANGED