Browse Source

fix: set showFields value while creating a new view

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/765/head
Pranav C 3 years ago
parent
commit
36232fc2b8
  1. 11
      packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue

11
packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue

@ -555,6 +555,16 @@ export default {
loading: false loading: false
}), }),
computed: { computed: {
newViewParams() {
if (!this.showFields) {
return {}
}
const showFields = { ...this.showFields }
Object.keys(showFields).forEach((k) => {
showFields[k] = true
})
return { showFields }
},
selectedViewIdLocal: { selectedViewIdLocal: {
set(val) { set(val) {
const view = (this.viewsList || []).find(v => v.id === val) const view = (this.viewsList || []).find(v => v.id === val)
@ -629,6 +639,7 @@ export default {
try { try {
this.copyViewRef = this.copyViewRef || { this.copyViewRef = this.copyViewRef || {
query_params: JSON.stringify({ query_params: JSON.stringify({
...this.newViewParams,
fieldsOrder: JSON.parse(mainView.query_params).fieldsOrder fieldsOrder: JSON.parse(mainView.query_params).fieldsOrder
}) })
} }

Loading…
Cancel
Save