Browse Source

fix/Fixed empty pills from appearing in lookup column, unwanted tables appearing in lookup dropdown and UI issue of sort

pull/2611/head
Muhammed Mustafa 2 years ago
parent
commit
d9a87904ff
  1. 7
      packages/nc-gui/components/project/spreadsheet/components/SortListMenu.vue
  2. 3
      packages/nc-gui/components/project/spreadsheet/components/editColumn/LookupOptions.vue
  3. 2
      packages/nc-gui/components/project/spreadsheet/components/virtualCell/LookupCell.vue

7
packages/nc-gui/components/project/spreadsheet/components/SortListMenu.vue

@ -1,7 +1,7 @@
<template>
<v-menu offset-y transition="slide-y-transition">
<template #activator="{ on }">
<v-badge :value="sortList && sortList.length" color="primary" dot overlap>
<v-badge :value="validSortsExist" color="primary" dot overlap>
<v-btn
v-t="['c:sort']"
class="nc-sort-menu-btn px-2 nc-remove-border"
@ -10,7 +10,7 @@
text
outlined
:class="{
'primary lighten-5 grey--text text--darken-3': sortList && sortList.length,
'primary lighten-5 grey--text text--darken-3': validSortsExist,
}"
v-on="on"
>
@ -98,6 +98,9 @@ export default {
icon: getUIDTIcon(c.uidt),
}));
},
validSortsExist() {
return this.sortList && this.sortList.filter(sort => sort.fk_column_id !== null).length > 0;
},
},
watch: {
value(v) {

3
packages/nc-gui/components/project/spreadsheet/components/editColumn/LookupOptions.vue

@ -75,7 +75,8 @@ export default {
col: c.colOptions,
column: c,
...this.tables.find(t => t.id === c.colOptions.fk_related_model_id),
}));
}))
.filter(table => table.col.fk_related_model_id === table.id && !table.mm);
return refTables;
},

2
packages/nc-gui/components/project/spreadsheet/components/virtualCell/LookupCell.vue

@ -141,7 +141,7 @@ export default {
},
localValueObj() {},
localValue() {
return this.value && (Array.isArray(this.value) ? this.value : [this.value]);
return this.value && (Array.isArray(this.value) ? this.value : [this.value]).filter(v => v !== null);
},
queryParams() {},
},

Loading…
Cancel
Save