Skip to content

Commit

Permalink
fixed problem with saving array values in custom config (#2397)
Browse files Browse the repository at this point in the history
- closes #2392
  • Loading branch information
foxriver76 authored Mar 4, 2024
1 parent 4ae2194 commit a360adf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ The icons may not be reused in other projects without the proper flaticon licens
-->
## Changelog
### **WORK IN PROGRESS**
* (foxriver76) fixed problem with saving array values in custom config
* (foxriver76) fixed issue on deleting admin
* (foxriver76) make UI update of controller and admin more verbose

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,15 +710,19 @@ class ObjectCustomEditor extends Component<ObjectCustomEditorProps, ObjectCustom
});
}

const isMultiEdit = this.props.objectIDs.length > 1;

obj.common.custom[instance].enabled = true;

Object.keys(newValues).forEach(attr => {
// if not different
if (!attr.startsWith('_')) {
// if we have an array, it is still the data of multiple different fields (multiEdit) do not override issue#2359
if (!Array.isArray(newValues[attr])) {
obj.common.custom[instance][attr] = newValues[attr];
if (Array.isArray(newValues[attr]) && isMultiEdit) {
return;
}

obj.common.custom[instance][attr] = newValues[attr];
}
});
}
Expand Down

0 comments on commit a360adf

Please sign in to comment.