@visns-studio/visns-components 4.2.6 → 4.2.7

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.
@@ -18,27 +18,29 @@ const Select = (props) => {
18
18
  : 'Please select an option'}
19
19
  </option>
20
20
  {options.map((item, index) =>
21
- item.options ? ( // Check if the item contains nested options (indicating an optgroup)
22
- <optgroup
23
- key={settings.id + '-' + item.id}
24
- label={item.label}
25
- >
26
- {item.options.map((subItem, subIndex) => (
27
- <option
28
- key={
29
- settings.id +
30
- '-' +
31
- item.id +
32
- '-' +
33
- subItem.id
34
- }
35
- value={subItem.id}
36
- {...dataOptions[subIndex]}
37
- >
38
- {subItem.label}
39
- </option>
40
- ))}
41
- </optgroup>
21
+ item.options ? (
22
+ item.options.length > 0 ? ( // Check if the item contains nested options (indicating an optgroup)
23
+ <optgroup
24
+ key={settings.id + '-' + item.id}
25
+ label={item.label}
26
+ >
27
+ {item.options.map((subItem, subIndex) => (
28
+ <option
29
+ key={
30
+ settings.id +
31
+ '-' +
32
+ item.id +
33
+ '-' +
34
+ subItem.id
35
+ }
36
+ value={subItem.id}
37
+ {...dataOptions[subIndex]}
38
+ >
39
+ {subItem.label}
40
+ </option>
41
+ ))}
42
+ </optgroup>
43
+ ) : null
42
44
  ) : (
43
45
  <option
44
46
  key={settings.id + '-' + item.id}
package/package.json CHANGED
@@ -57,7 +57,7 @@
57
57
  "react-dom": "^17.0.1"
58
58
  },
59
59
  "name": "@visns-studio/visns-components",
60
- "version": "4.2.6",
60
+ "version": "4.2.7",
61
61
  "description": "Various packages to assist in the development of our Custom Applications.",
62
62
  "main": "index.js",
63
63
  "scripts": {