@thecb/components 9.2.4-beta.16 → 9.2.4-beta.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "9.2.4-beta.16",
3
+ "version": "9.2.4-beta.17",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -281,28 +281,12 @@ const Dropdown = ({
281
281
  }
282
282
 
283
283
  setFilteredOptions(
284
- options.filter(option => {
285
- let inputString = inputValue?.toLowerCase();
286
- const inputStringContainsPlus = stringContains(/\+/, inputString);
287
- const inputStringContainsOpenParen = stringContains(/\(/, inputString);
288
- const inputStringContainsCloseParen = stringContains(/\)/, inputString);
289
-
290
- if (inputStringContainsPlus) {
291
- inputString = inputString.replace(/\+/, "\\+");
292
- }
293
-
294
- if (inputStringContainsOpenParen) {
295
- inputString = inputString.replace(/\(/, "\\(");
296
- }
297
-
298
- if (inputStringContainsCloseParen) {
299
- inputString = inputString.replace(/\)/, "\\)");
300
- }
301
- return (
302
- option?.value?.toLowerCase()?.match(inputString) ||
303
- option.text?.toLowerCase()?.match(inputString)
304
- );
305
- })
284
+ options.filter(
285
+ option =>
286
+ option?.value?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >=
287
+ 0 ||
288
+ option.text?.toLowerCase()?.indexOf(inputValue?.toLowerCase()) >= 0
289
+ )
306
290
  );
307
291
  }, [inputValue]);
308
292