Browse Source

Merge pull request #4876 from nocodb/fix/shared-view-warnings

fix: injection warnings on shared view
pull/4891/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
b253eda005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/nc-gui/components/shared-view/Grid.vue
  2. 4
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

3
packages/nc-gui/components/shared-view/Grid.vue

@ -23,7 +23,7 @@ const { signedIn } = useGlobal()
const { loadProject } = useProject() const { loadProject } = useProject()
useProvideSmartsheetStore(sharedView, meta, true, sorts, nestedFilters) const { isLocked } = useProvideSmartsheetStore(sharedView, meta, true, sorts, nestedFilters)
const reloadEventHook = createEventHook() const reloadEventHook = createEventHook()
@ -33,6 +33,7 @@ provide(MetaInj, meta)
provide(ActiveViewInj, sharedView) provide(ActiveViewInj, sharedView)
provide(FieldsInj, ref(meta.value?.columns || [])) provide(FieldsInj, ref(meta.value?.columns || []))
provide(IsPublicInj, ref(true)) provide(IsPublicInj, ref(true))
provide(IsLockedInj, isLocked)
if (signedIn.value) { if (signedIn.value) {
try { try {

4
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -27,7 +27,7 @@ const activeView = inject(ActiveViewInj, ref())
const reloadDataHook = inject(ReloadViewDataHookInj)! const reloadDataHook = inject(ReloadViewDataHookInj)!
const reloadViewMetaHook = inject(ReloadViewMetaHookInj)! const reloadViewMetaHook = inject(ReloadViewMetaHookInj, undefined)!
const rootFields = inject(FieldsInj) const rootFields = inject(FieldsInj)
@ -128,7 +128,7 @@ const coverImageColumnId = computed({
}) })
;(activeView.value.view as KanbanType).fk_cover_image_col_id = val ;(activeView.value.view as KanbanType).fk_cover_image_col_id = val
} }
reloadViewMetaHook.trigger() reloadViewMetaHook?.trigger()
} }
}, },
}) })

Loading…
Cancel
Save