Browse Source

fix(nc-gui): view reorder lost if we minimise table (#8245)

pull/8248/head
Ramesh Mane 7 months ago committed by GitHub
parent
commit
7b9de4e726
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      packages/nc-gui/store/views.ts

8
packages/nc-gui/store/views.ts

@ -134,8 +134,14 @@ export const useViewsStore = defineStore('viewsStore', () => {
tableId = tableId ?? tablesStore.activeTableId
if (tableId) {
if (!force && viewsByTable.value.get(tableId)) return
if (!force && viewsByTable.value.get(tableId)) {
viewsByTable.value.set(
tableId,
viewsByTable.value.get(tableId).sort((a, b) => a.order! - b.order!),
)
return
}
if (!ignoreLoading) isViewsLoading.value = true
const response = (await $api.dbView.list(tableId)).list as ViewType[]

Loading…
Cancel
Save