diff --git a/packages/nc-gui-v2/components/smartsheet/Grid.vue b/packages/nc-gui-v2/components/smartsheet/Grid.vue index 43f615bff3..aff46ce8f7 100644 --- a/packages/nc-gui-v2/components/smartsheet/Grid.vue +++ b/packages/nc-gui-v2/components/smartsheet/Grid.vue @@ -3,6 +3,19 @@ import type { ColumnType } from 'nocodb-sdk' import { UITypes, isVirtualCol } from 'nocodb-sdk' import { message } from 'ant-design-vue' import { + ActiveViewInj, + ChangePageInj, + FieldsInj, + IsFormInj, + IsGridInj, + IsLockedInj, + IsPublicInj, + MetaInj, + OpenNewRecordFormHookInj, + PaginationDataInj, + ReadonlyInj, + ReloadViewDataHookInj, + enumColor, inject, onClickOutside, onMounted, @@ -12,25 +25,12 @@ import { useEventListener, useGridViewColumnWidth, useSmartsheetStoreOrThrow, + useUIPermission, useViewData, watch, } from '#imports' import type { Row } from '~/composables' -import { - ActiveViewInj, - ChangePageInj, - FieldsInj, - IsFormInj, - IsGridInj, - IsLockedInj, - IsPublicInj, - MetaInj, - PaginationDataInj, - ReadonlyInj, - ReloadViewDataHookInj, -} from '~/context' import { NavigateDir } from '~/lib' -import { enumColor } from '~/utils' const meta = inject(MetaInj) @@ -42,7 +42,7 @@ const isPublicView = inject(IsPublicInj, ref(false)) // fields menu and get used in grid and gallery const fields = inject(FieldsInj, ref([])) const readOnly = inject(ReadonlyInj, false) -const isLocked = inject(IsLockedInj, false) +const isLocked = inject(IsLockedInj, ref(false)) const reloadViewDataHook = inject(ReloadViewDataHookInj) const openNewRecordFormHook = inject(OpenNewRecordFormHookInj) @@ -487,28 +487,32 @@ const onNavigate = (dir: NavigateDir) => { +