Browse Source

feat(gui-v2): provide isLocked in smartsheet

pull/3209/head
Wing-Kam Wong 2 years ago
parent
commit
760c3ae985
  1. 6
      packages/nc-gui-v2/components/tabs/Smartsheet.vue

6
packages/nc-gui-v2/components/tabs/Smartsheet.vue

@ -27,17 +27,17 @@ watchEffect(async () => {
const reloadEventHook = createEventHook<void>() const reloadEventHook = createEventHook<void>()
const { isGallery, isGrid, isForm, isLocked } = useProvideSmartsheetStore(activeView as Ref<TableType>, meta)
// todo: move to store // todo: move to store
provide(MetaInj, meta) provide(MetaInj, meta)
provide(TabMetaInj, tabMeta) provide(TabMetaInj, tabMeta)
provide(ActiveViewInj, activeView) provide(ActiveViewInj, activeView)
provide(IsLockedInj, false) provide(IsLockedInj, isLocked)
provide(ReloadViewDataHookInj, reloadEventHook) provide(ReloadViewDataHookInj, reloadEventHook)
provide(FieldsInj, fields) provide(FieldsInj, fields)
provide(RightSidebarInj, ref(false)) provide(RightSidebarInj, ref(false))
const { isGallery, isGrid, isForm } = useProvideSmartsheetStore(activeView as Ref<TableType>, meta)
watch(tabMeta, async (newTabMeta, oldTabMeta) => { watch(tabMeta, async (newTabMeta, oldTabMeta) => {
if (newTabMeta !== oldTabMeta && newTabMeta?.id) await getMeta(newTabMeta.id) if (newTabMeta !== oldTabMeta && newTabMeta?.id) await getMeta(newTabMeta.id)
}) })

Loading…
Cancel
Save