material-react-table-narender 2.13.17 → 2.13.18
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.
- package/dist/index.esm.js +11 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -2
- 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 +15 -3
package/dist/index.js
CHANGED
@@ -530,11 +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
536
|
const currentCell = event.currentTarget;
|
537
|
-
|
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
|
+
}
|
538
546
|
}
|
539
547
|
// if (!table.options.enableKeyboardShortcuts) return;
|
540
548
|
if (!enableKeyboardShortcuts)
|
@@ -2389,6 +2397,7 @@ const MRT_TableBodyCell = (_a) => {
|
|
2389
2397
|
const handleKeyDown = (event) => {
|
2390
2398
|
var _a;
|
2391
2399
|
(_a = tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(tableCellProps, event);
|
2400
|
+
debugger;
|
2392
2401
|
cellKeyboardShortcuts({
|
2393
2402
|
cell,
|
2394
2403
|
cellValue: cell.getValue(),
|