@dartech/arsenal-ui 1.3.40 → 1.3.41

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.js +5 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3882,12 +3882,14 @@ const PropertyFiller = ({
3882
3882
  required,
3883
3883
  useExpression
3884
3884
  });
3885
- const handleFillOptionChange = event => {
3885
+ const handleFillOptionChange = useCallback(event => {
3886
3886
  const selectedType = event.target.value;
3887
3887
  if (selectedType === 'null') {
3888
- onChange(null);
3888
+ // onChange(null);
3889
+ clearErrors(name);
3889
3890
  // register(name, { value: null });
3890
3891
  } else if (selectedType === 'widget') {
3892
+ clearErrors(name);
3891
3893
  if (propertyType === PropertyType.JSON && value && typeof value !== 'string' && fillOption === 'dem_builder' && 'properties' in value) {
3892
3894
  const definitionValue = Object.assign(Object.assign({}, value), {
3893
3895
  properties: propertiesArrayToObject(value.property || [])
@@ -3924,7 +3926,7 @@ const PropertyFiller = ({
3924
3926
  }
3925
3927
  setFillOption(selectedType);
3926
3928
  clearErrors(name);
3927
- };
3929
+ }, [name, clearErrors, value, setFillOption, onChange, fillOption, propertyType]);
3928
3930
  useEffect(() => {
3929
3931
  if (value === undefined) {
3930
3932
  onChange(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.3.40",
3
+ "version": "1.3.41",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"