es-grid-template 1.9.97 → 1.9.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { KeyboardEvent, MouseEvent } from 'react';
1
+ import type { KeyboardEvent as ReactKeyboardEvent, MouseEvent } from 'react';
2
2
  import type { RowFocusEventArgs } from '../type';
3
3
  type RowFocus<T> = (args: RowFocusEventArgs<T>) => void;
4
4
  /** Capture clicks even when a cell handles the event itself. */
@@ -6,7 +6,7 @@ export declare function getRowFocusHandlers<T>(rowData: T, rowFocus?: RowFocus<T
6
6
  onClickCapture: (event: MouseEvent<HTMLElement>) => void;
7
7
  onContextMenuCapture: (event: MouseEvent<HTMLElement>) => void;
8
8
  };
9
- /** Notify arrow focus without changing the existing navigation or selection. */
10
- export declare function notifyArrowRowFocus<T>(rowData: T, method: 'arrowUp' | 'arrowDown', useArrow?: boolean, rowFocus?: RowFocus<T>): void;
11
- export declare function focusArrowRow(event: KeyboardEvent, rowId: string, columnId: string, scrollToRow: () => void): void;
9
+ /** Report the last focused row after the arrow key is released. */
10
+ export declare function notifyArrowRowFocus<T>(event: ReactKeyboardEvent, rowData: T, method: 'arrowUp' | 'arrowDown', useArrow?: boolean, rowFocus?: RowFocus<T>): void;
11
+ export declare function focusArrowRow(event: ReactKeyboardEvent, rowId: string, columnId: string, scrollToRow: () => void): void;
12
12
  export {};
@@ -1,3 +1,6 @@
1
+ const gridViewportSelector = '[data-grid-scroll], [data-virtuoso-scroller]';
2
+ const pendingArrowFocus = new WeakMap();
3
+
1
4
  /** Capture clicks even when a cell handles the event itself. */
2
5
  export function getRowFocusHandlers(rowData, rowFocus) {
3
6
  return {
@@ -16,19 +19,52 @@ export function getRowFocusHandlers(rowData, rowFocus) {
16
19
  };
17
20
  }
18
21
 
19
- /** Notify arrow focus without changing the existing navigation or selection. */
20
- export function notifyArrowRowFocus(rowData, method, useArrow, rowFocus) {
21
- if (useArrow === true) rowFocus?.({
22
+ /** Report the last focused row after the arrow key is released. */
23
+ export function notifyArrowRowFocus(event, rowData, method, useArrow, rowFocus) {
24
+ if (useArrow !== true || !rowFocus) return;
25
+ const viewport = event.currentTarget.closest(gridViewportSelector);
26
+ const view = viewport?.ownerDocument.defaultView;
27
+ if (!viewport || !view) return;
28
+ const notify = () => rowFocus({
22
29
  rowData,
23
30
  method
24
31
  });
32
+ const pending = pendingArrowFocus.get(viewport);
33
+ if (pending) {
34
+ pending.key = event.key;
35
+ pending.notify = notify;
36
+ return;
37
+ }
38
+ const focus = {
39
+ key: event.key,
40
+ notify
41
+ };
42
+ pendingArrowFocus.set(viewport, focus);
43
+ const cancel = () => {
44
+ pendingArrowFocus.delete(viewport);
45
+ view.removeEventListener('keyup', release, true);
46
+ view.removeEventListener('blur', cancel);
47
+ view.removeEventListener('pointerdown', cancel, true);
48
+ };
49
+ const release = keyEvent => {
50
+ if (keyEvent.key !== focus.key) return;
51
+ cancel();
52
+ view.setTimeout(() => {
53
+ if (viewport.isConnected) focus.notify();
54
+ }, 0);
55
+ };
56
+
57
+ // A virtualized row can unmount before keyup reaches its original cell.
58
+ view.addEventListener('keyup', release, true);
59
+ view.addEventListener('blur', cancel);
60
+ view.addEventListener('pointerdown', cancel, true);
25
61
  }
26
62
  export function focusArrowRow(event, rowId, columnId, scrollToRow) {
27
63
  event.preventDefault();
28
64
  const source = event.currentTarget;
29
65
  const body = source.closest('.ui-rc-grid-row')?.parentElement;
30
66
  const row = body && Array.from(body.children).find(child => child.getAttribute('data-row-key') === rowId);
31
- const viewport = source.closest('[data-grid-scroll], [data-virtuoso-scroller]');
67
+ const viewport = source.closest(gridViewportSelector);
32
68
  const canScroll = viewport && viewport.scrollHeight > viewport.clientHeight;
33
69
  if (!row) {
34
70
  if (canScroll) scrollToRow();
@@ -791,7 +791,7 @@ export type IWrapSettings = {
791
791
  wrapMode?: IWrapMode;
792
792
  };
793
793
  export type SelectionSettings<T = AnyObject> = {
794
- /** Invoke rowFocus on ArrowUp/ArrowDown. Defaults to false. */
794
+ /** Invoke rowFocus for the final row after releasing ArrowUp or ArrowDown. Defaults to false. */
795
795
  useArrow?: boolean;
796
796
  mode?: 'checkbox' | 'radio';
797
797
  type?: 'single' | 'multiple';
@@ -459,7 +459,7 @@ const TableBodyCell = props => {
459
459
  focusArrowRow(e, nextRow.id, cell.column.id, () => props.rowVirtualizer?.scrollToIndex(nextIndex, {
460
460
  align: 'center'
461
461
  }));
462
- notifyArrowRowFocus(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
462
+ notifyArrowRowFocus(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
463
463
  }
464
464
  }
465
465
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -810,7 +810,7 @@ const TableBodyCellEdit = props => {
810
810
  focusArrowRow(e, nextRow.id, colId, () => rowVirtualizer.scrollToIndex(nextIndex, {
811
811
  align: 'center'
812
812
  }));
813
- notifyArrowRowFocus(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
813
+ notifyArrowRowFocus(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
814
814
  }
815
815
  return;
816
816
  }
@@ -105,7 +105,7 @@ const TableBodyCellEmpty = props => {
105
105
  focusArrowRow(e, nextRow.id, cell.column.id, () => props.rowVirtualizer?.scrollToIndex(nextIndex, {
106
106
  align: 'center'
107
107
  }));
108
- notifyArrowRowFocus(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
108
+ notifyArrowRowFocus(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
109
109
  }
110
110
  }
111
111
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -439,7 +439,7 @@ const TableBodyCell = props => {
439
439
  focusArrowRow(e, nextRow.id, cell.column.id, () => props.rowVirtualizer?.scrollToIndex(nextIndex, {
440
440
  align: 'center'
441
441
  }));
442
- notifyArrowRowFocus(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
442
+ notifyArrowRowFocus(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
443
443
  }
444
444
  }
445
445
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -196,10 +196,10 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
196
196
  value: any;
197
197
  rowData: RecordType;
198
198
  }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
199
- onCellStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
200
- onCellHeaderStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
199
+ onCellStyles?: Omit<CSSProperties, "position" | "left" | "right" | "display" | "width" | "minWidth"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "position" | "left" | "right" | "display" | "width" | "minWidth">);
200
+ onCellHeaderStyles?: Omit<CSSProperties, "position" | "left" | "right" | "display" | "width" | "minWidth"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "left" | "right" | "display" | "width" | "minWidth">);
201
201
  onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
202
- onCellFooterStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
202
+ onCellFooterStyles?: Omit<CSSProperties, "position" | "left" | "right" | "display" | "width" | "minWidth"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "left" | "right" | "display" | "width" | "minWidth">);
203
203
  getValue?: (row: any, rowIndex: number) => any;
204
204
  getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
205
205
  headerCellProps?: import("./../../grid-component/type").CellProps;
@@ -448,7 +448,7 @@ const TableBodyCell = props => {
448
448
  focusArrowRow(e, nextRow.id, cell.column.id, () => props.rowVirtualizer?.scrollToIndex(nextIndex, {
449
449
  align: 'center'
450
450
  }));
451
- notifyArrowRowFocus(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
451
+ notifyArrowRowFocus(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
452
452
  }
453
453
  }
454
454
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -838,7 +838,7 @@ const TableBodyCellEdit = props => {
838
838
  focusArrowRow(e, nextRow.id, colId, () => rowVirtualizer.scrollToIndex(nextIndex, {
839
839
  align: 'center'
840
840
  }));
841
- notifyArrowRowFocus(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
841
+ notifyArrowRowFocus(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
842
842
  }
843
843
  return;
844
844
  }
@@ -385,7 +385,7 @@ const TableBodyCell = props => {
385
385
  rowId: nextRow.id
386
386
  });
387
387
  focusArrowRow(e, nextRow.id, cell.column.id, () => props.scrollToRow?.(nextIndex));
388
- notifyArrowRowFocus(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
388
+ notifyArrowRowFocus(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
389
389
  }
390
390
  }
391
391
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -100,7 +100,7 @@ const TableBodyCellRowGroup = props => {
100
100
  rowId: nextRow.id
101
101
  });
102
102
  focusArrowRow(e, nextRow.id, cell.column.id, () => props.scrollToRow?.(nextIndex));
103
- notifyArrowRowFocus(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
103
+ notifyArrowRowFocus(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
104
104
  }
105
105
  }
106
106
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -1,4 +1,4 @@
1
- import type { KeyboardEvent, MouseEvent } from 'react';
1
+ import type { KeyboardEvent as ReactKeyboardEvent, MouseEvent } from 'react';
2
2
  import type { RowFocusEventArgs } from '../type';
3
3
  type RowFocus<T> = (args: RowFocusEventArgs<T>) => void;
4
4
  /** Capture clicks even when a cell handles the event itself. */
@@ -6,7 +6,7 @@ export declare function getRowFocusHandlers<T>(rowData: T, rowFocus?: RowFocus<T
6
6
  onClickCapture: (event: MouseEvent<HTMLElement>) => void;
7
7
  onContextMenuCapture: (event: MouseEvent<HTMLElement>) => void;
8
8
  };
9
- /** Notify arrow focus without changing the existing navigation or selection. */
10
- export declare function notifyArrowRowFocus<T>(rowData: T, method: 'arrowUp' | 'arrowDown', useArrow?: boolean, rowFocus?: RowFocus<T>): void;
11
- export declare function focusArrowRow(event: KeyboardEvent, rowId: string, columnId: string, scrollToRow: () => void): void;
9
+ /** Report the last focused row after the arrow key is released. */
10
+ export declare function notifyArrowRowFocus<T>(event: ReactKeyboardEvent, rowData: T, method: 'arrowUp' | 'arrowDown', useArrow?: boolean, rowFocus?: RowFocus<T>): void;
11
+ export declare function focusArrowRow(event: ReactKeyboardEvent, rowId: string, columnId: string, scrollToRow: () => void): void;
12
12
  export {};
@@ -6,6 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.focusArrowRow = focusArrowRow;
7
7
  exports.getRowFocusHandlers = getRowFocusHandlers;
8
8
  exports.notifyArrowRowFocus = notifyArrowRowFocus;
9
+ const gridViewportSelector = '[data-grid-scroll], [data-virtuoso-scroller]';
10
+ const pendingArrowFocus = new WeakMap();
11
+
9
12
  /** Capture clicks even when a cell handles the event itself. */
10
13
  function getRowFocusHandlers(rowData, rowFocus) {
11
14
  return {
@@ -24,19 +27,52 @@ function getRowFocusHandlers(rowData, rowFocus) {
24
27
  };
25
28
  }
26
29
 
27
- /** Notify arrow focus without changing the existing navigation or selection. */
28
- function notifyArrowRowFocus(rowData, method, useArrow, rowFocus) {
29
- if (useArrow === true) rowFocus?.({
30
+ /** Report the last focused row after the arrow key is released. */
31
+ function notifyArrowRowFocus(event, rowData, method, useArrow, rowFocus) {
32
+ if (useArrow !== true || !rowFocus) return;
33
+ const viewport = event.currentTarget.closest(gridViewportSelector);
34
+ const view = viewport?.ownerDocument.defaultView;
35
+ if (!viewport || !view) return;
36
+ const notify = () => rowFocus({
30
37
  rowData,
31
38
  method
32
39
  });
40
+ const pending = pendingArrowFocus.get(viewport);
41
+ if (pending) {
42
+ pending.key = event.key;
43
+ pending.notify = notify;
44
+ return;
45
+ }
46
+ const focus = {
47
+ key: event.key,
48
+ notify
49
+ };
50
+ pendingArrowFocus.set(viewport, focus);
51
+ const cancel = () => {
52
+ pendingArrowFocus.delete(viewport);
53
+ view.removeEventListener('keyup', release, true);
54
+ view.removeEventListener('blur', cancel);
55
+ view.removeEventListener('pointerdown', cancel, true);
56
+ };
57
+ const release = keyEvent => {
58
+ if (keyEvent.key !== focus.key) return;
59
+ cancel();
60
+ view.setTimeout(() => {
61
+ if (viewport.isConnected) focus.notify();
62
+ }, 0);
63
+ };
64
+
65
+ // A virtualized row can unmount before keyup reaches its original cell.
66
+ view.addEventListener('keyup', release, true);
67
+ view.addEventListener('blur', cancel);
68
+ view.addEventListener('pointerdown', cancel, true);
33
69
  }
34
70
  function focusArrowRow(event, rowId, columnId, scrollToRow) {
35
71
  event.preventDefault();
36
72
  const source = event.currentTarget;
37
73
  const body = source.closest('.ui-rc-grid-row')?.parentElement;
38
74
  const row = body && Array.from(body.children).find(child => child.getAttribute('data-row-key') === rowId);
39
- const viewport = source.closest('[data-grid-scroll], [data-virtuoso-scroller]');
75
+ const viewport = source.closest(gridViewportSelector);
40
76
  const canScroll = viewport && viewport.scrollHeight > viewport.clientHeight;
41
77
  if (!row) {
42
78
  if (canScroll) scrollToRow();
@@ -791,7 +791,7 @@ export type IWrapSettings = {
791
791
  wrapMode?: IWrapMode;
792
792
  };
793
793
  export type SelectionSettings<T = AnyObject> = {
794
- /** Invoke rowFocus on ArrowUp/ArrowDown. Defaults to false. */
794
+ /** Invoke rowFocus for the final row after releasing ArrowUp or ArrowDown. Defaults to false. */
795
795
  useArrow?: boolean;
796
796
  mode?: 'checkbox' | 'radio';
797
797
  type?: 'single' | 'multiple';
@@ -467,7 +467,7 @@ const TableBodyCell = props => {
467
467
  (0, _rowFocus.focusArrowRow)(e, nextRow.id, cell.column.id, () => props.rowVirtualizer?.scrollToIndex(nextIndex, {
468
468
  align: 'center'
469
469
  }));
470
- (0, _rowFocus.notifyArrowRowFocus)(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
470
+ (0, _rowFocus.notifyArrowRowFocus)(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
471
471
  }
472
472
  }
473
473
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -817,7 +817,7 @@ const TableBodyCellEdit = props => {
817
817
  (0, _rowFocus.focusArrowRow)(e, nextRow.id, colId, () => rowVirtualizer.scrollToIndex(nextIndex, {
818
818
  align: 'center'
819
819
  }));
820
- (0, _rowFocus.notifyArrowRowFocus)(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
820
+ (0, _rowFocus.notifyArrowRowFocus)(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
821
821
  }
822
822
  return;
823
823
  }
@@ -112,7 +112,7 @@ const TableBodyCellEmpty = props => {
112
112
  (0, _rowFocus.focusArrowRow)(e, nextRow.id, cell.column.id, () => props.rowVirtualizer?.scrollToIndex(nextIndex, {
113
113
  align: 'center'
114
114
  }));
115
- (0, _rowFocus.notifyArrowRowFocus)(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
115
+ (0, _rowFocus.notifyArrowRowFocus)(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
116
116
  }
117
117
  }
118
118
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -447,7 +447,7 @@ const TableBodyCell = props => {
447
447
  (0, _rowFocus.focusArrowRow)(e, nextRow.id, cell.column.id, () => props.rowVirtualizer?.scrollToIndex(nextIndex, {
448
448
  align: 'center'
449
449
  }));
450
- (0, _rowFocus.notifyArrowRowFocus)(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
450
+ (0, _rowFocus.notifyArrowRowFocus)(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
451
451
  }
452
452
  }
453
453
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -455,7 +455,7 @@ const TableBodyCell = props => {
455
455
  (0, _rowFocus.focusArrowRow)(e, nextRow.id, cell.column.id, () => props.rowVirtualizer?.scrollToIndex(nextIndex, {
456
456
  align: 'center'
457
457
  }));
458
- (0, _rowFocus.notifyArrowRowFocus)(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
458
+ (0, _rowFocus.notifyArrowRowFocus)(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
459
459
  }
460
460
  }
461
461
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -843,7 +843,7 @@ const TableBodyCellEdit = props => {
843
843
  (0, _rowFocus.focusArrowRow)(e, nextRow.id, colId, () => rowVirtualizer.scrollToIndex(nextIndex, {
844
844
  align: 'center'
845
845
  }));
846
- (0, _rowFocus.notifyArrowRowFocus)(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
846
+ (0, _rowFocus.notifyArrowRowFocus)(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
847
847
  }
848
848
  return;
849
849
  }
@@ -392,7 +392,7 @@ const TableBodyCell = props => {
392
392
  rowId: nextRow.id
393
393
  });
394
394
  (0, _rowFocus.focusArrowRow)(e, nextRow.id, cell.column.id, () => props.scrollToRow?.(nextIndex));
395
- (0, _rowFocus.notifyArrowRowFocus)(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
395
+ (0, _rowFocus.notifyArrowRowFocus)(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
396
396
  }
397
397
  }
398
398
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
@@ -107,7 +107,7 @@ const TableBodyCellRowGroup = props => {
107
107
  rowId: nextRow.id
108
108
  });
109
109
  (0, _rowFocus.focusArrowRow)(e, nextRow.id, cell.column.id, () => props.scrollToRow?.(nextIndex));
110
- (0, _rowFocus.notifyArrowRowFocus)(nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
110
+ (0, _rowFocus.notifyArrowRowFocus)(e, nextRow.original, e.key === 'ArrowDown' ? 'arrowDown' : 'arrowUp', selectionSettings?.useArrow, rowFocus);
111
111
  }
112
112
  }
113
113
  if (e.ctrlKey && e.code === 'Space' && cell.row.getCanSelect()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.9.97",
3
+ "version": "1.9.98",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",