Skip to content

Commit

Permalink
fix: selecting last row of a Table component using keyboard (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
otokitoki authored Nov 6, 2023
1 parent 39b850d commit 7f8e5e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down

0 comments on commit 7f8e5e1

Please sign in to comment.