material-react-table-narender 2.13.16 → 2.13.18

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -439,9 +439,19 @@ const cellKeyboardShortcuts = ({ cell, cellElements, cellValue, containerElement
439
439
  debugger;
440
440
  const { getState, setEnableKeyboardShortcuts, } = table;
441
441
  const { enableKeyboardShortcuts } = getState();
442
- if (event.altKey && event.key.toLowerCase() === 'n') {
442
+ if (event.altKey) {
443
443
  event.preventDefault();
444
444
  setEnableKeyboardShortcuts(!enableKeyboardShortcuts);
445
+ const currentCell = event.currentTarget;
446
+ if (enableKeyboardShortcuts) {
447
+ currentCell.style.outline = '2px solid red';
448
+ // setTimeout(() => {
449
+ // currentCell.style.outline = '';
450
+ // },
451
+ // 1000);
452
+ currentCell.focus();
453
+ return;
454
+ }
445
455
  }
446
456
  // if (!table.options.enableKeyboardShortcuts) return;
447
457
  if (!enableKeyboardShortcuts)
@@ -2296,6 +2306,7 @@ const MRT_TableBodyCell = (_a) => {
2296
2306
  const handleKeyDown = (event) => {
2297
2307
  var _a;
2298
2308
  (_a = tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(tableCellProps, event);
2309
+ debugger;
2299
2310
  cellKeyboardShortcuts({
2300
2311
  cell,
2301
2312
  cellValue: cell.getValue(),