@abgov/jsonforms-components 1.26.1 → 1.26.2

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.
Files changed (2) hide show
  1. package/index.esm.js +5 -1
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -4075,13 +4075,17 @@ const EnumSelect = props => {
4075
4075
  return Object.assign({}, d);
4076
4076
  }
4077
4077
  })];
4078
+ const hasNonEmptyOptions = newOptions.some(option => option.value !== '');
4079
+ if (!hasNonEmptyOptions && newOptions.length === 1 && newOptions[0].value === '') {
4080
+ return newOptions;
4081
+ }
4078
4082
  if (newOptions && newOptions.length === 0) {
4079
4083
  newOptions.push({
4080
4084
  label: '',
4081
4085
  value: ''
4082
4086
  });
4083
4087
  }
4084
- return newOptions;
4088
+ return newOptions.filter(option => option.value !== '');
4085
4089
  }, [registerData, options]);
4086
4090
  useEffect(() => {
4087
4091
  if (registerConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.26.1",
3
+ "version": "1.26.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",