diff --git a/packages/nc-gui/components/project/spreadsheet/components/cell/EnumCell.vue b/packages/nc-gui/components/project/spreadsheet/components/cell/EnumCell.vue index e0506b2852..cacbb43ee7 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/cell/EnumCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/cell/EnumCell.vue @@ -17,7 +17,9 @@ export default { props: ['value', 'column'], computed: { enumValues() { - const opts = this.column.colOptions.options || []; + const opts = (this.column.colOptions) + ? this.column.colOptions.options.filter(el => el.title !== '') || [] + : []; for (const op of opts.filter(el => el.order === null)) { op.title = op.title.replace(/^'/, '').replace(/'$/, ''); } diff --git a/packages/nc-gui/components/project/spreadsheet/components/cell/SetListCell.vue b/packages/nc-gui/components/project/spreadsheet/components/cell/SetListCell.vue index 678391e35e..717554417b 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/cell/SetListCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/cell/SetListCell.vue @@ -19,7 +19,9 @@ export default { props: ['value', 'column'], computed: { setValues() { - const opts = this.column.colOptions.options || []; + const opts = (this.column.colOptions) + ? this.column.colOptions.options.filter(el => el.title !== '') || [] + : []; for (const op of opts.filter(el => el.order === null)) { op.title = op.title.replace(/^'/, '').replace(/'$/, ''); } diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumListEditableCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumListEditableCell.vue index f536cecf81..e9f1dd000f 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumListEditableCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumListEditableCell.vue @@ -55,7 +55,9 @@ export default { }, }, enumValues() { - const opts = this.column.colOptions.options || []; + const opts = (this.column.colOptions) + ? this.column.colOptions.options.filter(el => el.title !== '') || [] + : []; for (const op of opts.filter(el => el.order === null)) { op.title = op.title.replace(/^'/, '').replace(/'$/, ''); } diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListEditableCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListEditableCell.vue index 7e3b3ef062..8ff31570a3 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListEditableCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListEditableCell.vue @@ -59,7 +59,9 @@ export default { }, }, setValues() { - const opts = this.column.colOptions.options || []; + const opts = (this.column.colOptions) + ? this.column.colOptions.options.filter(el => el.title !== '') || [] + : []; for (const op of opts.filter(el => el.order === null)) { op.title = op.title.replace(/^'/, '').replace(/'$/, ''); }