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 +12 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/body/MRT_TableBodyCell.tsx +1 -0
- package/src/components/footer/MRT_TableFooterCell.tsx +1 -1
- package/src/utils/cell.utils.ts +16 -3
package/dist/index.js
CHANGED
@@ -530,9 +530,19 @@ const cellKeyboardShortcuts = ({ cell, cellElements, cellValue, containerElement
|
|
530
530
|
debugger;
|
531
531
|
const { getState, setEnableKeyboardShortcuts, } = table;
|
532
532
|
const { enableKeyboardShortcuts } = getState();
|
533
|
-
if (event.altKey
|
533
|
+
if (event.altKey) {
|
534
534
|
event.preventDefault();
|
535
535
|
setEnableKeyboardShortcuts(!enableKeyboardShortcuts);
|
536
|
+
const currentCell = event.currentTarget;
|
537
|
+
if (enableKeyboardShortcuts) {
|
538
|
+
currentCell.style.outline = '2px solid red';
|
539
|
+
// setTimeout(() => {
|
540
|
+
// currentCell.style.outline = '';
|
541
|
+
// },
|
542
|
+
// 1000);
|
543
|
+
currentCell.focus();
|
544
|
+
return;
|
545
|
+
}
|
536
546
|
}
|
537
547
|
// if (!table.options.enableKeyboardShortcuts) return;
|
538
548
|
if (!enableKeyboardShortcuts)
|
@@ -2387,6 +2397,7 @@ const MRT_TableBodyCell = (_a) => {
|
|
2387
2397
|
const handleKeyDown = (event) => {
|
2388
2398
|
var _a;
|
2389
2399
|
(_a = tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(tableCellProps, event);
|
2400
|
+
debugger;
|
2390
2401
|
cellKeyboardShortcuts({
|
2391
2402
|
cell,
|
2392
2403
|
cellValue: cell.getValue(),
|