Browse Source

feat: LTAR list - on let/right arrow key navigate through pages

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4222/head
Pranav C 2 years ago
parent
commit
46e6978a2b
  1. 9
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

9
packages/nc-gui/components/virtual-cell/components/ListItems.vue

@ -107,8 +107,17 @@ watch(expandedFormDlg, (nexVal) => {
useSelectedCellKeyupListener(vModel, (e: KeyboardEvent) => {
switch (e.key) {
case 'ArrowLeft':
e.stopPropagation()
if (childrenExcludedListPagination.page > 1) childrenExcludedListPagination.page--
break
case 'ArrowRight':
e.stopPropagation()
if (
childrenExcludedList.value?.pageInfo &&
childrenExcludedListPagination.page <
(childrenExcludedList.value.pageInfo.totalRows || 1) / childrenExcludedListPagination.size
)
childrenExcludedListPagination.page++
break
case 'ArrowUp':
selectedRowIndex.value = Math.max(0, selectedRowIndex.value - 1)

Loading…
Cancel
Save