{
+
-
diff --git a/packages/nc-gui-v2/components/smartsheet/Grid.vue b/packages/nc-gui-v2/components/smartsheet/Grid.vue
index 608839559c..a6aaf8a503 100644
--- a/packages/nc-gui-v2/components/smartsheet/Grid.vue
+++ b/packages/nc-gui-v2/components/smartsheet/Grid.vue
@@ -41,7 +41,7 @@ const isPublicView = inject(IsPublicInj, ref(false))
// keep a root fields variable and will get modified from
// fields menu and get used in grid and gallery
const fields = inject(FieldsInj, ref([]))
-const readonly = inject(ReadonlyInj, ref(false))
+const readOnly = inject(ReadonlyInj, false)
const isLocked = inject(IsLockedInj, false)
const reloadViewDataHook = inject(ReloadViewDataHookInj)
@@ -59,7 +59,15 @@ const { xWhere, isPkAvail, cellRefs } = useSmartsheetStoreOrThrow()
const addColumnDropdown = ref(false)
-const contextMenu = ref(false)
+const _contextMenu = ref(false)
+const contextMenu = computed({
+ get: () => _contextMenu.value,
+ set: (val) => {
+ if (!readOnly) {
+ _contextMenu.value = val
+ }
+ },
+})
const contextMenuTarget = ref(false)
const expandedFormDlg = ref(false)
@@ -272,11 +280,15 @@ const onNavigate = (dir: NavigateDir) => {
case NavigateDir.NEXT:
if (selected.row < data.value.length - 1) {
selected.row++
+ } else {
+ editEnabled = false
}
break
case NavigateDir.PREV:
if (selected.row > 0) {
selected.row--
+ } else {
+ editEnabled = false
}
break
}
@@ -302,15 +314,20 @@ const expandForm = (row: Row, state: Record
) => {