mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fixes: general properties of widgets are not getting saved (#7638)
This commit is contained in:
parent
b3625d6cef
commit
139967132b
4 changed files with 16 additions and 2 deletions
|
|
@ -1709,6 +1709,10 @@ export const buildComponentMetaDefinition = (components = {}) => {
|
|||
...componentMeta.definition.others,
|
||||
...currentComponentData?.component.definition.others,
|
||||
},
|
||||
general: {
|
||||
...componentMeta.definition.general,
|
||||
...currentComponentData?.component.definition.general,
|
||||
},
|
||||
};
|
||||
|
||||
const mergedComponent = {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,11 @@ export class CreateComponentTable1691006952074 implements MigrationInterface {
|
|||
type: 'json',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
name: 'general_properties',
|
||||
type: 'json',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
name: 'styles',
|
||||
type: 'json',
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ export class Component {
|
|||
@Column('simple-json')
|
||||
properties: any;
|
||||
|
||||
@Column('simple-json', { name: 'general_properties', nullable: true })
|
||||
general: any;
|
||||
|
||||
@Column('simple-json')
|
||||
styles: any;
|
||||
|
||||
|
|
|
|||
|
|
@ -208,8 +208,9 @@ export class ComponentsService {
|
|||
return transformedComponents;
|
||||
}
|
||||
|
||||
createComponentWithLayout(componentData, layoutData) {
|
||||
const { id, name, properties, styles, generalStyles, validations, parent, displayPreferences } = componentData;
|
||||
createComponentWithLayout(componentData: Component, layoutData) {
|
||||
const { id, name, properties, styles, generalStyles, validations, parent, displayPreferences, general } =
|
||||
componentData;
|
||||
const { type, top, left, width, height } = layoutData;
|
||||
const componentWithLayout = {
|
||||
[id]: {
|
||||
|
|
@ -221,6 +222,7 @@ export class ComponentsService {
|
|||
styles,
|
||||
generalStyles,
|
||||
validations,
|
||||
general,
|
||||
others: displayPreferences,
|
||||
},
|
||||
parent,
|
||||
|
|
|
|||
Loading…
Reference in a new issue