@saltcorn/builder 0.9.3-rc.1 → 0.9.3

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": "@saltcorn/builder",
3
- "version": "0.9.3-rc.1",
3
+ "version": "0.9.3",
4
4
  "description": "Drag and drop view builder for Saltcorn, open-source no-code platform",
5
5
  "main": "index.js",
6
6
  "homepage": "https://saltcorn.com",
@@ -904,9 +904,15 @@ const ConfigField = ({
904
904
  onChange={(e) => e.target && myOnChange(e.target.value)}
905
905
  onBlur={(e) => e.target && myOnChange(e.target.value)}
906
906
  >
907
- {field.options.map((o, ix) => (
908
- <option key={ix}>{o}</option>
909
- ))}
907
+ {field.options.map((o, ix) =>
908
+ o.name && o.label ? (
909
+ <option key={ix} value={o.name}>
910
+ {o.label}
911
+ </option>
912
+ ) : (
913
+ <option key={ix}>{o}</option>
914
+ )
915
+ )}
910
916
  </select>
911
917
  ),
912
918
  btn_select: () => (