|
|
@ -5,7 +5,6 @@ import { isVirtualCol } from 'nocodb-sdk' |
|
|
|
import { message } from 'ant-design-vue' |
|
|
|
import { message } from 'ant-design-vue' |
|
|
|
import { |
|
|
|
import { |
|
|
|
inject, |
|
|
|
inject, |
|
|
|
onKeyStroke, |
|
|
|
|
|
|
|
onMounted, |
|
|
|
onMounted, |
|
|
|
onUnmounted, |
|
|
|
onUnmounted, |
|
|
|
provide, |
|
|
|
provide, |
|
|
@ -18,7 +17,6 @@ import type { Row } from '~/composables' |
|
|
|
import { |
|
|
|
import { |
|
|
|
ActiveViewInj, |
|
|
|
ActiveViewInj, |
|
|
|
ChangePageInj, |
|
|
|
ChangePageInj, |
|
|
|
EditModeInj, |
|
|
|
|
|
|
|
FieldsInj, |
|
|
|
FieldsInj, |
|
|
|
IsFormInj, |
|
|
|
IsFormInj, |
|
|
|
IsGridInj, |
|
|
|
IsGridInj, |
|
|
@ -247,19 +245,13 @@ const onNavigate = (dir: NavigateDir) => { |
|
|
|
if (selected.row === null || selected.col === null) return |
|
|
|
if (selected.row === null || selected.col === null) return |
|
|
|
switch (dir) { |
|
|
|
switch (dir) { |
|
|
|
case NavigateDir.NEXT: |
|
|
|
case NavigateDir.NEXT: |
|
|
|
if (selected.col < visibleColLength - 1) { |
|
|
|
if (selected.row < data.value.length - 1) { |
|
|
|
selected.col++ |
|
|
|
|
|
|
|
} else if (selected.row < data.value.length - 1) { |
|
|
|
|
|
|
|
selected.row++ |
|
|
|
selected.row++ |
|
|
|
selected.col = 0 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
break |
|
|
|
case NavigateDir.PREV: |
|
|
|
case NavigateDir.PREV: |
|
|
|
if (selected.col > 0) { |
|
|
|
if (selected.row > 0) { |
|
|
|
selected.col-- |
|
|
|
|
|
|
|
} else if (selected.row > 0) { |
|
|
|
|
|
|
|
selected.row-- |
|
|
|
selected.row-- |
|
|
|
selected.col = visibleColLength - 1 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|