Skip to content

Commit 4ff923c

Browse files
committed
ui: formBuilder - fix grid update methods
Signed-off-by: Pamfilos Fokianos <[email protected]>
1 parent 8b96fef commit 4ff923c

File tree

1 file changed

+4
-4
lines changed
  • ui/cap-react/src/components/cms/components/SchemaWizard/PropertyEditor

1 file changed

+4
-4
lines changed

ui/cap-react/src/components/cms/components/SchemaWizard/PropertyEditor/customizeField.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class CustomizeField extends React.Component {
7575

7676
gridChange = new_grid => {
7777
let { uiSchema } = this.props;
78-
uiSchema = uiSchema.toJS();
78+
uiSchema = uiSchema ? uiSchema.toJS() : {};
7979

8080
let { "ui:options": uiOptions = {}, ...rest } = uiSchema;
8181
let { grid = {}, ...restUIOptions } = uiOptions;
@@ -91,7 +91,7 @@ class CustomizeField extends React.Component {
9191

9292
gridColumnChange = new_gridColumn => {
9393
let { uiSchema } = this.props;
94-
uiSchema = uiSchema.toJS();
94+
uiSchema = uiSchema ? uiSchema.toJS() : {};
9595

9696
let { "ui:options": uiOptions = {}, ...rest } = uiSchema;
9797
let { grid = {}, ...restUIOptions } = uiOptions;
@@ -112,7 +112,7 @@ class CustomizeField extends React.Component {
112112
if (SIZE_OPTIONS.indexOf(newSize) < 0) return;
113113

114114
let { uiSchema } = this.props;
115-
uiSchema = uiSchema.toJS();
115+
uiSchema = uiSchema ? uiSchema.toJS() : {};
116116

117117
let { "ui:options": uiOptions = {}, ...rest } = uiSchema;
118118
let { size, ...restUIOptions } = uiOptions;
@@ -130,7 +130,7 @@ class CustomizeField extends React.Component {
130130
if (["center", "start", "end"].indexOf(newAlign) < 0) return;
131131

132132
let { uiSchema } = this.props;
133-
uiSchema = uiSchema.toJS();
133+
uiSchema = uiSchema ? uiSchema.toJS() : {};
134134

135135
let { "ui:options": uiOptions = {}, ...rest } = uiSchema;
136136
let { align, ...restUIOptions } = uiOptions;

0 commit comments

Comments
 (0)