From c10741cf9cada931cb96d617f06a37890e78c83a Mon Sep 17 00:00:00 2001 From: toki-hayakawa Date: Tue, 7 Nov 2023 01:58:46 +0900 Subject: [PATCH] fix: Fixed maximum value of selected row Fixed a problem in which the selected line unintentionally changes when the key is pressed. --- src/components/table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table.ts b/src/components/table.ts index e2a0eeb..430a73a 100644 --- a/src/components/table.ts +++ b/src/components/table.ts @@ -187,7 +187,7 @@ export class Table extends Component { break; } - selectedRow.value = clamp(selectedRow.peek(), 0, lastDataRow - 1); + selectedRow.value = clamp(selectedRow.peek(), 0, lastDataRow); offsetRow.value = clamp(selectedRow.peek() - ~~((height - 4) / 2), 0, lastDataRow - height + 5); });