From 19b26f6a25d600706e2eab1d5bf16989297f25b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cpranavxc=E2=80=9D?= Date: Sun, 30 May 2021 20:16:15 +0530 Subject: [PATCH] fix: fix: wrong editable component fix #198 --- .../spreadsheet/components/editableCell.vue | 16 +++++++++------- .../project/spreadsheet/mixins/cell.js | 6 +++--- packages/nc-gui/helpers/PgUi.js | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell.vue index af3084b75b..db7e2d3b6c 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editableCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell.vue @@ -13,13 +13,6 @@ v-model="localState"> - - - @@ -58,6 +51,15 @@ v-on="parentListeners"> + + + + + diff --git a/packages/nc-gui/components/project/spreadsheet/mixins/cell.js b/packages/nc-gui/components/project/spreadsheet/mixins/cell.js index a692d6158b..1d710c2c20 100644 --- a/packages/nc-gui/components/project/spreadsheet/mixins/cell.js +++ b/packages/nc-gui/components/project/spreadsheet/mixins/cell.js @@ -26,7 +26,7 @@ export default { return this.abstractType === 'string'; }, isTextArea() { - return this.abstractType === 'text'; + return this.column.uidt === 'LongText'; }, isInt() { return this.abstractType === 'integer'; }, isFloat() { @@ -40,9 +40,9 @@ export default { }, isJSON() { return this.abstractType === 'json'; }, isEnum() { - return this.abstractType === 'enum'; + return this.column.uidt === 'SingleSelect'; }, isSet() { - return this.abstractType === 'set'; + return this.column.uidt === 'MultiSelect'; }, isAttachment() { return this.column.uidt === 'Attachment'; } diff --git a/packages/nc-gui/helpers/PgUi.js b/packages/nc-gui/helpers/PgUi.js index 035f3f812c..4c15f1805d 100644 --- a/packages/nc-gui/helpers/PgUi.js +++ b/packages/nc-gui/helpers/PgUi.js @@ -1717,7 +1717,7 @@ export class PgUi { colProp.dt = 'text'; break; case 'SingleSelect': - colProp.dt = 'enum'; + colProp.dt = 'text'; break; case 'Collaborator': colProp.dt = 'character varying';