material-react-table-narender 2.13.16 → 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 +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.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
|
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(),
|