Browse Source

fix: rename variable

pull/6585/head
DarkPhoenix2704 1 year ago
parent
commit
8d37144e1c
  1. 4
      packages/nc-gui/components/dashboard/TreeView/ViewsList.vue
  2. 4
      packages/nc-gui/store/views.ts

4
packages/nc-gui/components/dashboard/TreeView/ViewsList.vue

@ -38,7 +38,7 @@ const { $e } = useNuxtApp()
const { t } = useI18n() const { t } = useI18n()
const { viewsByTable, activeView, _recentViews } = storeToRefs(useViewsStore()) const { viewsByTable, activeView, allRecentViews } = storeToRefs(useViewsStore())
const { navigateToTable } = useTablesStore() const { navigateToTable } = useTablesStore()
@ -239,7 +239,7 @@ async function onRename(view: ViewType, originalTitle?: string, undo = false) {
}) })
} }
// update view name in recent views // update view name in recent views
_recentViews.value = _recentViews.value.map((rv) => { allRecentViews.value = allRecentViews.value.map((rv) => {
if (rv.viewId === view.id && rv.tableID === view.fk_model_id) { if (rv.viewId === view.id && rv.tableID === view.fk_model_id) {
rv.viewName = view.title rv.viewName = view.title
} }

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

@ -8,7 +8,7 @@ export const useViewsStore = defineStore('viewsStore', () => {
const router = useRouter() const router = useRouter()
const recentViews = computed(() => []) const recentViews = computed(() => [])
const _recentViews = ref<any>([]) const allRecentViews = ref<any>([])
const route = router.currentRoute const route = router.currentRoute
const tablesStore = useTablesStore() const tablesStore = useTablesStore()
@ -239,7 +239,7 @@ export const useViewsStore = defineStore('viewsStore', () => {
isPaginationLoading, isPaginationLoading,
loadViews, loadViews,
recentViews, recentViews,
_recentViews, allRecentViews,
views, views,
activeView, activeView,
openedViewsTab, openedViewsTab,

Loading…
Cancel
Save