material-react-table-narender 2.13.6 → 2.13.7
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 +17 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/locales/te.ts +0 -0
- package/src/utils/cell.utils.ts +25 -9
package/package.json
CHANGED
File without changes
|
package/src/utils/cell.utils.ts
CHANGED
@@ -149,23 +149,39 @@ export const cellKeyboardShortcuts = <TData extends MRT_RowData = MRT_RowData>({
|
|
149
149
|
].includes(event.key)
|
150
150
|
) {
|
151
151
|
event.preventDefault();
|
152
|
-
if (['ArrowDown'].includes(event.key)) {
|
153
|
-
|
152
|
+
// if (['ArrowDown'].includes(event.key)) {
|
153
|
+
// debugger; // This will pause execution for debugging purposes
|
154
154
|
|
155
|
-
|
156
|
-
|
155
|
+
// // Select the input element within the MUI Autocomplete component
|
156
|
+
// const autocomplete = currentCell.querySelector('.MuiAutocomplete-root input[type="text"]');
|
157
|
+
|
158
|
+
|
159
|
+
// // Check if the current cell is an MUI Autocomplete
|
160
|
+
// if (autocomplete) {
|
161
|
+
// return; // Exit the function if it's an Autocomplete
|
162
|
+
// }
|
163
|
+
|
164
|
+
// // Additional logic for when it's not an Autocomplete can go here
|
165
|
+
// }
|
157
166
|
|
158
|
-
// Check if the current cell is an MUI Autocomplete
|
159
|
-
if (autocomplete) {
|
160
|
-
return; // Exit the function if it's an Autocomplete
|
161
|
-
}
|
162
167
|
|
163
|
-
|
168
|
+
if (['ArrowDown','ArrowUp'].includes(event.key)) {
|
169
|
+
const autocomplete = currentCell.querySelector('.MuiAutocomplete-root input[type="text"]');
|
170
|
+
|
171
|
+
// Check if the autocomplete input exists and is focused
|
172
|
+
if (autocomplete && document.activeElement === autocomplete) {
|
173
|
+
// Do something with the autocomplete input
|
174
|
+
console.log('Autocomplete input found and is focused:', autocomplete);
|
175
|
+
return; // Exit if it's an Autocomplete and it is focused
|
176
|
+
}
|
177
|
+
|
178
|
+
// Additional logic if not an Autocomplete or not focused
|
164
179
|
}
|
165
180
|
|
166
181
|
|
167
182
|
|
168
183
|
|
184
|
+
|
169
185
|
const currentRow = parentElement || currentCell.closest('tr');
|
170
186
|
const tableElement = containerElement || currentCell.closest('table');
|
171
187
|
const allCells =
|