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.esm.js
CHANGED
@@ -439,11 +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
|
442
|
+
if (event.altKey) {
|
443
443
|
event.preventDefault();
|
444
444
|
setEnableKeyboardShortcuts(!enableKeyboardShortcuts);
|
445
445
|
const currentCell = event.currentTarget;
|
446
|
-
|
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
|
+
}
|
447
455
|
}
|
448
456
|
// if (!table.options.enableKeyboardShortcuts) return;
|
449
457
|
if (!enableKeyboardShortcuts)
|
@@ -2298,6 +2306,7 @@ const MRT_TableBodyCell = (_a) => {
|
|
2298
2306
|
const handleKeyDown = (event) => {
|
2299
2307
|
var _a;
|
2300
2308
|
(_a = tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(tableCellProps, event);
|
2309
|
+
debugger;
|
2301
2310
|
cellKeyboardShortcuts({
|
2302
2311
|
cell,
|
2303
2312
|
cellValue: cell.getValue(),
|