Browse Source

fix: fix: wrong editable component

fix #198
pull/154/head
“pranavxc” 4 years ago
parent
commit
19b26f6a25
  1. 16
      packages/nc-gui/components/project/spreadsheet/components/editableCell.vue
  2. 6
      packages/nc-gui/components/project/spreadsheet/mixins/cell.js
  3. 2
      packages/nc-gui/helpers/PgUi.js

16
packages/nc-gui/components/project/spreadsheet/components/editableCell.vue

@ -13,13 +13,6 @@
v-model="localState"></editable-attachment-cell>
<text-cell v-else-if="isString" v-on="parentListeners" v-model="localState"></text-cell>
<text-area-cell
:is-form="isForm"
v-else-if="isTextArea" @input="$emit('save')" v-model="localState"
v-on="parentListeners"
></text-area-cell>
<boolean-cell :isForm="isForm" v-else-if="isBoolean" v-on="parentListeners"
v-model="localState" @input="$emit('change');"></boolean-cell>
@ -58,6 +51,15 @@
v-on="parentListeners"></set-list-editable-cell>
<set-list-cell :column="column" v-else-if="isSet" v-model="localState"
v-on="parentListeners"></set-list-cell>
<text-cell v-else-if="isString" v-on="parentListeners" v-model="localState"></text-cell>
<text-area-cell
:is-form="isForm"
v-else-if="isTextArea" @input="$emit('save')" v-model="localState"
v-on="parentListeners"
></text-area-cell>
<!--<set-list-checkbox-cell :column="column" v-else-if="isSet" v-model="localState"
v-on="parentListeners"></set-list-checkbox-cell>-->

6
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';
}

2
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';

Loading…
Cancel
Save