@megha-ui/react 1.2.358 → 1.2.359

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.
@@ -146,6 +146,8 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
146
146
  .sort((a, b) => (a.label > b.label ? 1 : -1))
147
147
  .filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()))
148
148
  : options.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()));
149
+ console.log(options);
150
+ setFilteredOptions(options);
149
151
  const grouped = [];
150
152
  if (isGrouping) {
151
153
  const groups = [...new Set(options.map((opt) => opt.group))];
@@ -165,7 +167,6 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
165
167
  }
166
168
  setGroupedOptions(grouped);
167
169
  }
168
- setFilteredOptions(options);
169
170
  }, [searchTerm, options, isSort, isGrouping]);
170
171
  const handleSelect = (value, isDisabled) => {
171
172
  if (isDisabled)
@@ -394,7 +395,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
394
395
  width: "100%",
395
396
  }, children: [option.icon &&
396
397
  option.isDelete &&
397
- !option.isDelete && (_jsx("span", { children: option.icon })), _jsx("span", { style: { margin: "0 0.5rem" }, children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value)));
398
+ !option.isDelete && _jsx("span", { children: option.icon }), _jsx("span", { style: { margin: "0 0.5rem" }, children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value)));
398
399
  })] }, gIndex)))) : (filteredOptions.map((option, index) => (_jsxs("li", { ref: (el) => {
399
400
  optionRefs.current[index] = el;
400
401
  }, onClick: (e) => onSelectChange
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.358",
3
+ "version": "1.2.359",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",