material-react-table-narender 2.13.9 → 2.13.11
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 +30 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +30 -1
- package/dist/index.js.map +1 -1
- package/locales/te/index.d.ts +3 -0
- package/locales/te/index.esm.d.ts +3 -0
- package/locales/te/index.esm.js +95 -0
- package/locales/te/index.js +99 -0
- package/locales/te/package.json +6 -0
- package/package.json +1 -1
- package/src/utils/cell.utils.ts +28 -0
package/dist/index.esm.js
CHANGED
@@ -435,7 +435,7 @@ const openEditingCell = ({ cell, table, }) => {
|
|
435
435
|
}
|
436
436
|
};
|
437
437
|
const cellKeyboardShortcuts = ({ cell, cellElements, cellValue, containerElement, event, header, parentElement, table, }) => {
|
438
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
438
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
439
439
|
debugger;
|
440
440
|
if (!table.options.enableKeyboardShortcuts)
|
441
441
|
return;
|
@@ -491,6 +491,35 @@ const cellKeyboardShortcuts = ({ cell, cellElements, cellValue, containerElement
|
|
491
491
|
event.preventDefault();
|
492
492
|
header.column.toggleSorting();
|
493
493
|
}
|
494
|
+
else if ("Enter" === event.key) {
|
495
|
+
debugger;
|
496
|
+
event.preventDefault();
|
497
|
+
const input = currentCell.querySelector('input');
|
498
|
+
const select = currentCell.querySelector('select');
|
499
|
+
const checkbox = currentCell.querySelector('input[type="checkbox"]');
|
500
|
+
const button = currentCell.querySelector('button');
|
501
|
+
const autocomplete = currentCell.querySelector('.MuiAutocomplete-root input[type="text"]');
|
502
|
+
// Focus the appropriate element
|
503
|
+
if (autocomplete) {
|
504
|
+
autocomplete.focus();
|
505
|
+
(_j = autocomplete.select) === null || _j === void 0 ? void 0 : _j.call(autocomplete);
|
506
|
+
}
|
507
|
+
else if (input) {
|
508
|
+
input.focus();
|
509
|
+
(_k = input.select) === null || _k === void 0 ? void 0 : _k.call(input);
|
510
|
+
}
|
511
|
+
else if (select) {
|
512
|
+
select.focus();
|
513
|
+
}
|
514
|
+
else if (checkbox) {
|
515
|
+
checkbox.focus();
|
516
|
+
// checkbox.click();
|
517
|
+
}
|
518
|
+
else if (button) {
|
519
|
+
button.focus();
|
520
|
+
// button.click();
|
521
|
+
}
|
522
|
+
}
|
494
523
|
}
|
495
524
|
else if ([
|
496
525
|
'ArrowRight',
|