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

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

@ -75,7 +75,8 @@ export default {
col: c.colOptions, col: c.colOptions,
column: c, column: c,
...this.tables.find(t => t.id === c.colOptions.fk_related_model_id), ...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; return refTables;
}, },

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

@ -141,7 +141,7 @@ export default {
}, },
localValueObj() {}, localValueObj() {},
localValue() { 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() {}, queryParams() {},
}, },

Loading…
Cancel
Save