tabler-react-2 0.1.102 → 0.1.103

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.
@@ -104,11 +104,14 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
104
104
  }) || null;
105
105
  setSelectedValue(matchedValue);
106
106
  }, [value, values]);
107
+ var normalize = function normalize(str) {
108
+ return str.toLowerCase().replace(/[\s_\-+]+/g, "");
109
+ };
107
110
 
108
111
  // Filter values based on the search query using getLabelText
109
112
  (0, _react.useEffect)(function () {
110
113
  setFilteredValues(values.filter(function (val) {
111
- return getLabelText(val).toLowerCase().includes(searchQuery.toLowerCase());
114
+ return getLabelText(val).toLowerCase().includes(searchQuery.toLowerCase()) || normalize(val.searchIndex.toLowerCase()).includes(normalize(searchQuery).toLowerCase());
112
115
  }));
113
116
  }, [searchQuery, values]);
114
117
  var handleSelection = function handleSelection(val) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabler-react-2",
3
- "version": "0.1.102",
3
+ "version": "0.1.103",
4
4
  "description": "A react implementation of Tabler ui",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {