Minor keyboard navigation around fix
Summary: Fixed minor keyboard navigation annoyance: pressing arrow down on the last entry would remove selection, then jump to first row. Pressing up on first row would deselect then select first again. After this change the first/last item is kept selected in those cases Reviewed By: passy Differential Revision: D28958705 fbshipit-source-id: 01dbce3971ed965eae3b74e6706fef96aa86df66
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6224daf247
commit
23c0781127
@@ -188,9 +188,9 @@ export function DataTable<T extends object>(
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
tableManager.addRangeToSelection(index, index, true);
|
||||
} else if (e.shiftKey) {
|
||||
tableManager.selectItem(index, true);
|
||||
tableManager.selectItem(index, true, true);
|
||||
} else {
|
||||
tableManager.selectItem(index);
|
||||
tableManager.selectItem(index, false, true);
|
||||
}
|
||||
|
||||
dragging.current = true;
|
||||
|
||||
Reference in New Issue
Block a user