From 46e6978a2be02edd59a12fff0dc6e41bbf7b5a88 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 3 Nov 2022 15:25:51 +0530 Subject: [PATCH] feat: LTAR list - on let/right arrow key navigate through pages Signed-off-by: Pranav C --- .../components/virtual-cell/components/ListItems.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/nc-gui/components/virtual-cell/components/ListItems.vue b/packages/nc-gui/components/virtual-cell/components/ListItems.vue index d603088520..d20e171177 100644 --- a/packages/nc-gui/components/virtual-cell/components/ListItems.vue +++ b/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)