Browse Source

fix: form view for select column

Re #2767

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/2751/head
mertmit 2 years ago
parent
commit
66525a8769
  1. 1
      packages/nc-gui/components/project/spreadsheet/components/EditableCell.vue
  2. 16
      packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumListEditableCell.vue
  3. 11
      packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListEditableCell.vue

1
packages/nc-gui/components/project/spreadsheet/components/EditableCell.vue

@ -83,6 +83,7 @@
v-else-if="isSet && (active || isForm) && !isLocked && !(isPublic && !isForm) && _isUIAllowed('tableRowUpdate')"
v-model="localState"
:column="column"
:is-form="isForm"
v-on="parentListeners"
/>
<set-list-cell v-else-if="isSet" v-model="localState" :column="column" v-on="parentListeners" />

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

@ -1,4 +1,5 @@
<template>
<div>
<v-select
v-model="localState"
:items="enumValues"
@ -8,7 +9,7 @@
dense
flat
hide-details
class="mt-0"
:class="`mt-0 ${isForm ? 'form-select': ''}`"
:clearable="!column.rqd"
v-on="parentListeners"
>
@ -33,15 +34,12 @@
<v-icon small class="mt-1"> mdi-menu-down </v-icon>
</template>
</v-select>
</div>
</template>
<script>
import colors from '@/mixins/colors';
export default {
name: 'EnumListEditableCell',
mixins: [colors],
props: {
value: String,
column: Object,
@ -103,6 +101,14 @@ export default {
font-size: 13px !important;
}
}
.form-select {
.v-select__selections {
border: 1px solid rgba(127,130,139,0.2);
}
input {
z-index: -1;
}
}
}
</style>
<!--

11
packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListEditableCell.vue

@ -12,7 +12,7 @@
solo
hide-details
deletable-chips
class="text-center mt-0"
:class="`text-center mt-0 ${isForm ? 'form-select': ''}`"
>
<template #selection="data">
<v-chip
@ -47,6 +47,7 @@ export default {
props: {
value: String,
column: Object,
isForm: Boolean,
},
computed: {
localState: {
@ -109,6 +110,14 @@ export default {
font-size: 12px !important;
color: gray !important;
}
.form-select {
.v-select__selections {
border: 1px solid rgba(127,130,139,0.2);
}
input {
z-index: -1;
}
}
}
</style>

Loading…
Cancel
Save