mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fixes: Toggling display preferences is not saving for components. (#7629)
This commit is contained in:
parent
f2113eeefa
commit
017782bef3
1 changed files with 8 additions and 3 deletions
|
|
@ -82,17 +82,22 @@ export class ComponentsService {
|
|||
const updatedDefinition = component.definition;
|
||||
const columnsUpdated = Object.keys(updatedDefinition);
|
||||
|
||||
const newComponentData = columnsUpdated.reduce((acc, column) => {
|
||||
const newComponentsData = columnsUpdated.reduce((acc, column) => {
|
||||
const newColumnData = {
|
||||
...componentData[column],
|
||||
...updatedDefinition[column],
|
||||
};
|
||||
|
||||
acc[column] = newColumnData;
|
||||
if (column === 'others') {
|
||||
acc['displayPreferences'] = newColumnData;
|
||||
} else {
|
||||
acc[column] = newColumnData;
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
await manager.update(Component, componentId, newComponentData);
|
||||
await manager.update(Component, componentId, newComponentsData);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue