@thecb/components 6.0.0-beta.18 → 6.0.0-beta.19

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": "6.0.0-beta.18",
3
+ "version": "6.0.0-beta.19",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -191,15 +191,15 @@ const Dropdown = ({
191
191
  };
192
192
 
193
193
  const handleItemSelection = (evt, choice, i) => {
194
- disabledValues.includes(choice.value)
195
- ? evt => evt.preventDefault()
196
- : () => {
197
- setSelectedRef(optionRefs.current[i]);
198
- onSelect(choice.value);
199
- if (isOpen) {
200
- onClick();
201
- }
202
- };
194
+ if (disabledValues.includes(choice.value)) {
195
+ evt.preventDefault();
196
+ } else {
197
+ setSelectedRef(optionRefs.current[i]);
198
+ onSelect(choice.value);
199
+ if (isOpen) {
200
+ onClick();
201
+ }
202
+ }
203
203
  };
204
204
 
205
205
  useEffect(() => {