@1771technologies/lytenyte-pro 1.0.17 → 1.0.19
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/README.md +2 -2
- package/dist/+types.d.ts +4 -19
- package/dist/__play__/cell-selections/cell-selection.play.js +1 -1
- package/dist/__play__/filter-select/filter-select.play.js +1 -1
- package/dist/cell-selection/cell-selection-driver.js +2 -2
- package/dist/row-data-source-server/server-data.js +0 -2
- package/dist/state/api/position-from-element.js +1 -1
- package/dist/state/use-lytenyte.js +0 -2
- package/main.css +111 -1
- package/package.json +3 -3
- package/dist/state/api/focus-cell.d.ts +0 -5
- package/dist/state/api/focus-cell.js +0 -124
package/README.md
CHANGED
|
@@ -110,12 +110,12 @@ information on available support channels and response options.
|
|
|
110
110
|
|
|
111
111
|
## Contributing
|
|
112
112
|
|
|
113
|
-
Please review our [contributing guide](
|
|
113
|
+
Please review our [contributing guide](https://github.com/1771-Technologies/lytenyte/blob/main/CONTRIBUTING.md) to learn about our development
|
|
114
114
|
process, bug reporting procedures, and codebase maintenance practices.
|
|
115
115
|
|
|
116
116
|
## Changelog
|
|
117
117
|
|
|
118
|
-
Our [changelog](https://www.1771technologies.com/docs/changelog/
|
|
118
|
+
Our [changelog](https://www.1771technologies.com/docs/changelog/latest) is regularly updated
|
|
119
119
|
with detailed notes on new features, improvements, and bug fixes in each release.
|
|
120
120
|
LyteNyte Grid follows [semantic versioning](https://semver.org/) to ensure clear and predictable upgrade paths.
|
|
121
121
|
|
package/dist/+types.d.ts
CHANGED
|
@@ -2865,20 +2865,6 @@ export interface ColumnMoveParams<T> {
|
|
|
2865
2865
|
*/
|
|
2866
2866
|
readonly updatePinState?: boolean;
|
|
2867
2867
|
}
|
|
2868
|
-
/**
|
|
2869
|
-
* The accepted input types for the `focusCell` method, which updates the active focus in LyteNyte Grid.
|
|
2870
|
-
* Supports various formats:
|
|
2871
|
-
*
|
|
2872
|
-
* - A row/column pair to focus a specific cell.
|
|
2873
|
-
* - A header or group header cell position.
|
|
2874
|
-
* - A directional alias ("next", "prev", "up", "down") relative to the current focus (only when the grid is focused).
|
|
2875
|
-
*
|
|
2876
|
-
* @group Grid API
|
|
2877
|
-
*/
|
|
2878
|
-
export type FocusCellParams<T> = {
|
|
2879
|
-
row: number;
|
|
2880
|
-
column: string | number | Column<T>;
|
|
2881
|
-
} | PositionHeaderCell | Omit<PositionHeaderGroupCell, "columnStartIndex" | "columnEndIndex"> | "next" | "prev" | "up" | "down";
|
|
2882
2868
|
/**
|
|
2883
2869
|
* The LyteNyte Grid API provides a comprehensive set of methods that allow developers
|
|
2884
2870
|
* to programmatically query, update, and manipulate grid state and data.
|
|
@@ -2957,11 +2943,6 @@ export interface GridApi<T> {
|
|
|
2957
2943
|
* Accepts a configuration object that controls the scroll behavior.
|
|
2958
2944
|
*/
|
|
2959
2945
|
readonly scrollIntoView: (options: ScrollIntoViewOptions<T>) => void;
|
|
2960
|
-
/**
|
|
2961
|
-
* Sets focus to a specific cell or navigates the focus based on a direction keyword.
|
|
2962
|
-
* Useful for keyboard-driven navigation and programmatic focus management.
|
|
2963
|
-
*/
|
|
2964
|
-
readonly focusCell: (position: FocusCellParams<T>) => void;
|
|
2965
2946
|
/**
|
|
2966
2947
|
* Starts cell editing at a specified location. If the grid is set to read-only mode, this method has no effect.
|
|
2967
2948
|
*/
|
|
@@ -6150,6 +6131,10 @@ export interface RowDataSourceServerParams<T> {
|
|
|
6150
6131
|
*
|
|
6151
6132
|
* Use this property when you want the grid to reset based on some external piece of data, such as an
|
|
6152
6133
|
* external search query.
|
|
6134
|
+
*
|
|
6135
|
+
* Note all the items in the list should be referentially stable. LyteNyte Grid will shallow compare the
|
|
6136
|
+
* array, and check equality using the `!==` operator. If an item is not stable it may result in an infinite
|
|
6137
|
+
* reset loop.
|
|
6153
6138
|
*/
|
|
6154
6139
|
readonly dataFetchExternals?: unknown[];
|
|
6155
6140
|
/**
|
|
@@ -45,7 +45,7 @@ export function CellSelectionDriver() {
|
|
|
45
45
|
const focusable = getNearestFocusable(gridId, target);
|
|
46
46
|
if (!focusable)
|
|
47
47
|
return;
|
|
48
|
-
const position = getPositionFromFocusable(
|
|
48
|
+
const position = getPositionFromFocusable(gridId, focusable);
|
|
49
49
|
if (position.kind !== "cell" && position.kind !== "full-width")
|
|
50
50
|
return;
|
|
51
51
|
const rowIndex = position.rowIndex;
|
|
@@ -132,7 +132,7 @@ export function CellSelectionDriver() {
|
|
|
132
132
|
const focusable = getNearestFocusable(gridId, target);
|
|
133
133
|
if (!focusable)
|
|
134
134
|
return;
|
|
135
|
-
const position = getPositionFromFocusable(
|
|
135
|
+
const position = getPositionFromFocusable(gridId, focusable);
|
|
136
136
|
if (position.kind !== "cell" && position.kind !== "full-width")
|
|
137
137
|
return;
|
|
138
138
|
const rowIndex = position.rowIndex;
|
|
@@ -323,10 +323,8 @@ export class ServerData {
|
|
|
323
323
|
})
|
|
324
324
|
.map(([index, c]) => [index, c.request]);
|
|
325
325
|
const seenRequests = this.#seenRequests;
|
|
326
|
-
console.log(structuredClone(seenRequests));
|
|
327
326
|
erroredRequests.map((x) => seenRequests.delete(x.id));
|
|
328
327
|
erroredGroups.map((x) => seenRequests.delete(x[1].request.id));
|
|
329
|
-
console.log(structuredClone(seenRequests));
|
|
330
328
|
this.#rowsWithError.clear();
|
|
331
329
|
this.#rowsWithGroupError.clear();
|
|
332
330
|
const requests = [];
|
|
@@ -4,6 +4,6 @@ export const makePositionFromElement = (grid) => {
|
|
|
4
4
|
const focusable = getNearestFocusable(grid.state.gridId.get(), el);
|
|
5
5
|
if (!focusable)
|
|
6
6
|
return null;
|
|
7
|
-
return getPositionFromFocusable(
|
|
7
|
+
return getPositionFromFocusable(grid.state.gridId.get(), focusable);
|
|
8
8
|
};
|
|
9
9
|
};
|
|
@@ -20,7 +20,6 @@ import { makeRowGroupColumnIndex } from "./api/row-group-column-index.js";
|
|
|
20
20
|
import { makeRowGroupIsExpanded } from "./api/row-group-is-expanded.js";
|
|
21
21
|
import { makeRowGroupToggle } from "./api/row-group-toggle.js";
|
|
22
22
|
import { makeRowGroupApplyExpansions } from "./api/row-group-apply-expansions.js";
|
|
23
|
-
import { makeFocusCell } from "./api/focus-cell.js";
|
|
24
23
|
import { makeEditBegin } from "./api/edit-begin.js";
|
|
25
24
|
import { makeEditIsCellActive } from "./api/edit-is-cell-active.js";
|
|
26
25
|
import { makeEditEnd } from "./api/edit-end.js";
|
|
@@ -609,7 +608,6 @@ export function makeLyteNyte(p) {
|
|
|
609
608
|
editEnd: makeEditEnd(grid),
|
|
610
609
|
editIsCellActive: makeEditIsCellActive(grid),
|
|
611
610
|
editUpdate: makeEditUpdate(grid),
|
|
612
|
-
focusCell: makeFocusCell(grid),
|
|
613
611
|
rowById: makeRowById(grid),
|
|
614
612
|
rowByIndex: makeRowByIndex(grid),
|
|
615
613
|
rowDetailIsExpanded: makeRowDetailIsExpanded(grid),
|
package/main.css
CHANGED
|
@@ -159,6 +159,114 @@
|
|
|
159
159
|
--lng1771-pill-icon-color: var(--lng1771-gray-60);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
.light .lng1771-cotton-candy,
|
|
163
|
+
.lng1771-cotton-candy {
|
|
164
|
+
--lng1771-primary-05: rgba(240, 48, 230, 0.03);
|
|
165
|
+
--lng1771-primary-10: rgba(240, 48, 230, 0.07);
|
|
166
|
+
--lng1771-primary-30: rgba(240, 48, 230, 0.25);
|
|
167
|
+
--lng1771-primary-50: rgba(240, 48, 230, 1);
|
|
168
|
+
--lng1771-primary-70: rgba(240, 48, 230, 1);
|
|
169
|
+
--lng1771-primary-90: rgba(194, 0, 184, 1);
|
|
170
|
+
|
|
171
|
+
--lng1771-row-selected: color-mix(in srgb, var(--color-accent) 30%, transparent);
|
|
172
|
+
--lng1771-focus-outline: var(--color-primary);
|
|
173
|
+
|
|
174
|
+
--lng1771-gray-00: #cff8ff;
|
|
175
|
+
--lng1771-gray-02: #b0eaf2;
|
|
176
|
+
--lng1771-gray-05: #fde9ff;
|
|
177
|
+
--lng1771-gray-10: #e4d5f5;
|
|
178
|
+
--lng1771-gray-20: #c8cef3;
|
|
179
|
+
--lng1771-gray-30: #c1c7f4;
|
|
180
|
+
--lng1771-gray-40: color-mix(in srgb, #677af3 70%, black);
|
|
181
|
+
--lng1771-gray-50: color-mix(in srgb, #677af3 65%, black);
|
|
182
|
+
--lng1771-gray-60: #4237a9;
|
|
183
|
+
--lng1771-gray-70: color-mix(in srgb, #677af3 90%, white);
|
|
184
|
+
--lng1771-gray-80: #1c1484;
|
|
185
|
+
--lng1771-gray-90: #151234;
|
|
186
|
+
--lng1771-gray-100: rgb(0, 0, 0);
|
|
187
|
+
|
|
188
|
+
--lng1771-pill-plain-fill: var(--lng1771-gray-20);
|
|
189
|
+
--lng1771-pill-column-fill: #c4c2ff;
|
|
190
|
+
--lng1771-pill-column-stroke: #754bff;
|
|
191
|
+
--lng1771-pill-pivot-fill: #ffc5e1;
|
|
192
|
+
--lng1771-pill-pivot-stroke: #f0959e;
|
|
193
|
+
--lng1771-pill-group-fill: #97ffaa;
|
|
194
|
+
--lng1771-pill-group-stroke: #4ce96e;
|
|
195
|
+
--lng1771-pill-icon-color: var(--lng1771-gray-50);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.light .lng1771-shadcn,
|
|
199
|
+
.lng1771-shadcn-light {
|
|
200
|
+
--lng1771-primary-05: color-mix(in srgb, var(--color-accent) 5%, transparent);
|
|
201
|
+
--lng1771-primary-10: color-mix(in srgb, var(--color-accent) 10%, transparent);
|
|
202
|
+
--lng1771-primary-30: color-mix(in srgb, var(--color-accent-foreground) 10%, transparent);
|
|
203
|
+
--lng1771-primary-50: var(--color-accent-foreground);
|
|
204
|
+
--lng1771-primary-70: color-mix(in srgb, var(--color-accent) 70%, black);
|
|
205
|
+
--lng1771-primary-90: color-mix(in srgb, var(--color-accent) 90%, black);
|
|
206
|
+
|
|
207
|
+
--lng1771-row-selected: color-mix(in srgb, var(--color-accent) 30%, transparent);
|
|
208
|
+
--lng1771-focus-outline: var(--color-primary);
|
|
209
|
+
|
|
210
|
+
--lng1771-gray-00: var(--color-background);
|
|
211
|
+
--lng1771-gray-02: color-mix(in srgb, var(--color-background) 99%, black);
|
|
212
|
+
--lng1771-gray-05: color-mix(in srgb, var(--color-background) 98%, black);
|
|
213
|
+
--lng1771-gray-10: color-mix(in srgb, var(--color-background) 95%, black);
|
|
214
|
+
--lng1771-gray-20: color-mix(in srgb, var(--color-background) 90%, black);
|
|
215
|
+
--lng1771-gray-30: color-mix(in srgb, var(--color-background) 86%, black);
|
|
216
|
+
--lng1771-gray-40: color-mix(in srgb, var(--color-background) 70%, black);
|
|
217
|
+
--lng1771-gray-50: color-mix(in srgb, var(--color-background) 65%, black);
|
|
218
|
+
--lng1771-gray-60: color-mix(in srgb, var(--color-background) 40%, black);
|
|
219
|
+
--lng1771-gray-70: color-mix(in srgb, var(--color-background) 20%, black);
|
|
220
|
+
--lng1771-gray-80: var(--color-secondary-foreground);
|
|
221
|
+
--lng1771-gray-90: var(--color-primary);
|
|
222
|
+
--lng1771-gray-100: black;
|
|
223
|
+
|
|
224
|
+
--lng1771-pill-plain-fill: var(--lng1771-gray-20);
|
|
225
|
+
--lng1771-pill-column-fill: var(--color-primary-foreground);
|
|
226
|
+
--lng1771-pill-column-stroke: var(--color-primary);
|
|
227
|
+
--lng1771-pill-pivot-fill: #f5f3ff;
|
|
228
|
+
--lng1771-pill-pivot-stroke: #ddd6ff;
|
|
229
|
+
--lng1771-pill-group-fill: #d9f2eb;
|
|
230
|
+
--lng1771-pill-group-stroke: #538a7f;
|
|
231
|
+
--lng1771-pill-icon-color: var(--lng1771-gray-50);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.dark .lng1771-shadcn,
|
|
235
|
+
.lng1771-shadcn-dark {
|
|
236
|
+
--lng1771-primary-05: color-mix(in srgb, var(--color-accent) 5%, transparent);
|
|
237
|
+
--lng1771-primary-10: color-mix(in srgb, var(--color-accent) 10%, transparent);
|
|
238
|
+
--lng1771-primary-30: color-mix(in srgb, var(--color-accent-foreground) 10%, transparent);
|
|
239
|
+
--lng1771-primary-50: var(--color-accent-foreground);
|
|
240
|
+
--lng1771-primary-70: color-mix(in srgb, var(--color-accent) 70%, white);
|
|
241
|
+
--lng1771-primary-90: color-mix(in srgb, var(--color-accent) 90%, white);
|
|
242
|
+
|
|
243
|
+
--lng1771-row-selected: color-mix(in srgb, var(--color-accent) 30%, transparent);
|
|
244
|
+
--lng1771-focus-outline: var(--color-primary);
|
|
245
|
+
|
|
246
|
+
--lng1771-gray-00: var(--color-background);
|
|
247
|
+
--lng1771-gray-02: color-mix(in srgb, var(--color-background) 99%, white);
|
|
248
|
+
--lng1771-gray-05: color-mix(in srgb, var(--color-background) 98%, white);
|
|
249
|
+
--lng1771-gray-10: color-mix(in srgb, var(--color-background) 95%, white);
|
|
250
|
+
--lng1771-gray-20: color-mix(in srgb, var(--color-background) 90%, white);
|
|
251
|
+
--lng1771-gray-30: color-mix(in srgb, var(--color-background) 86%, white);
|
|
252
|
+
--lng1771-gray-40: color-mix(in srgb, var(--color-background) 70%, white);
|
|
253
|
+
--lng1771-gray-50: color-mix(in srgb, var(--color-background) 65%, white);
|
|
254
|
+
--lng1771-gray-60: color-mix(in srgb, var(--color-background) 40%, white);
|
|
255
|
+
--lng1771-gray-70: color-mix(in srgb, var(--color-background) 20%, white);
|
|
256
|
+
--lng1771-gray-80: var(--color-secondary-foreground);
|
|
257
|
+
--lng1771-gray-90: var(--color-primary);
|
|
258
|
+
--lng1771-gray-100: white;
|
|
259
|
+
|
|
260
|
+
--lng1771-pill-plain-fill: var(--lng1771-gray-20);
|
|
261
|
+
--lng1771-pill-column-fill: var(--color-primary-foreground);
|
|
262
|
+
--lng1771-pill-column-stroke: var(--color-primary);
|
|
263
|
+
--lng1771-pill-pivot-fill: #2f0d68;
|
|
264
|
+
--lng1771-pill-pivot-stroke: #4d179a;
|
|
265
|
+
--lng1771-pill-group-fill: #162456;
|
|
266
|
+
--lng1771-pill-group-stroke: #1c398e;
|
|
267
|
+
--lng1771-pill-icon-color: var(--lng1771-gray-50);
|
|
268
|
+
}
|
|
269
|
+
|
|
162
270
|
.lng-grid {
|
|
163
271
|
[data-ln-has-cell-selection="true"] [data-ln-cell="true"]:focus-visible {
|
|
164
272
|
outline: none;
|
|
@@ -174,6 +282,8 @@
|
|
|
174
282
|
font-family: var(--lng1771-typeface);
|
|
175
283
|
|
|
176
284
|
user-select: none;
|
|
285
|
+
-moz-user-select: none;
|
|
286
|
+
-webkit-user-select: none;
|
|
177
287
|
|
|
178
288
|
background-color: var(--lng1771-gray-00);
|
|
179
289
|
|
|
@@ -278,7 +388,7 @@
|
|
|
278
388
|
height: calc(100% - 8px);
|
|
279
389
|
background-color: var(--lng1771-gray-20);
|
|
280
390
|
}
|
|
281
|
-
&[data-ln-
|
|
391
|
+
&[data-ln-colpin="end"]::after {
|
|
282
392
|
inset-inline-end: unset;
|
|
283
393
|
inset-inline-start: 0px;
|
|
284
394
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1771technologies/lytenyte-pro",
|
|
3
3
|
"description": "Blazingly fast headless React data grid with 100s of features.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.19",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "COMMERCIAL",
|
|
7
7
|
"files": [
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@1771technologies/lytenyte-
|
|
52
|
-
"@1771technologies/lytenyte-
|
|
51
|
+
"@1771technologies/lytenyte-shared": "1.0.19",
|
|
52
|
+
"@1771technologies/lytenyte-core": "1.0.19"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { focusCell, getHeaderRows, handleNavigation, isColumnFloatingHeader, } from "@1771technologies/lytenyte-shared";
|
|
2
|
-
import { clamp } from "@1771technologies/lytenyte-shared";
|
|
3
|
-
export const makeFocusCell = (grid) => {
|
|
4
|
-
return (position) => {
|
|
5
|
-
const vp = grid.state.viewport.get();
|
|
6
|
-
if (!vp)
|
|
7
|
-
return false;
|
|
8
|
-
if (typeof position === "string") {
|
|
9
|
-
let key = "";
|
|
10
|
-
if (position === "up")
|
|
11
|
-
key = "ArrowUp";
|
|
12
|
-
else if (position === "down")
|
|
13
|
-
key = "ArrowDown";
|
|
14
|
-
else if (position === "next")
|
|
15
|
-
key = grid.state.rtl.get() ? "ArrowLeft" : "ArrowRight";
|
|
16
|
-
else if (position === "prev")
|
|
17
|
-
key = grid.state.rtl.get() ? "ArrowRight" : "ArrowLeft";
|
|
18
|
-
if (!key)
|
|
19
|
-
return false;
|
|
20
|
-
const ds = grid.state.rowDataStore;
|
|
21
|
-
handleNavigation({
|
|
22
|
-
event: {
|
|
23
|
-
key,
|
|
24
|
-
ctrlKey: false,
|
|
25
|
-
metaKey: false,
|
|
26
|
-
preventDefault: () => { },
|
|
27
|
-
stopPropagation: () => { },
|
|
28
|
-
},
|
|
29
|
-
topCount: grid.state.rowDataStore.rowTopCount.get(),
|
|
30
|
-
centerCount: grid.state.rowDataStore.rowCenterCount.get(),
|
|
31
|
-
isRowDetailExpanded: (r) => {
|
|
32
|
-
const row = grid.api.rowByIndex(r);
|
|
33
|
-
if (!row)
|
|
34
|
-
return false;
|
|
35
|
-
return grid.api.rowDetailIsExpanded(row);
|
|
36
|
-
},
|
|
37
|
-
viewport: vp,
|
|
38
|
-
rowCount: ds.rowCount.get(),
|
|
39
|
-
columnCount: grid.state.columnMeta.get().columnsVisible.length,
|
|
40
|
-
focusActive: grid.internal.focusActive,
|
|
41
|
-
gridId: grid.state.gridId.get(),
|
|
42
|
-
getRootCell: grid.api.cellRoot,
|
|
43
|
-
rtl: grid.state.rtl.get(),
|
|
44
|
-
scrollIntoView: grid.api.scrollIntoView,
|
|
45
|
-
});
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
if ("kind" in position) {
|
|
49
|
-
if (position.kind === "header-cell") {
|
|
50
|
-
grid.api.scrollIntoView({ column: position.colIndex });
|
|
51
|
-
const run = () => {
|
|
52
|
-
const header = getHeaderRows(vp);
|
|
53
|
-
if (!header)
|
|
54
|
-
return false;
|
|
55
|
-
for (const row of header) {
|
|
56
|
-
const cell = row.querySelector(`[data-ln-header-cell][data-ln-colindex="${position.colIndex}"]`);
|
|
57
|
-
if (!cell)
|
|
58
|
-
continue;
|
|
59
|
-
if (isColumnFloatingHeader(cell))
|
|
60
|
-
continue;
|
|
61
|
-
cell.focus();
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
return false;
|
|
65
|
-
};
|
|
66
|
-
if (!run()) {
|
|
67
|
-
setTimeout(() => {
|
|
68
|
-
if (!run()) {
|
|
69
|
-
setTimeout(() => run(), 20);
|
|
70
|
-
}
|
|
71
|
-
}, 8);
|
|
72
|
-
}
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
else if (position.kind === "header-group-cell") {
|
|
76
|
-
grid.api.scrollIntoView({ column: position.colIndex });
|
|
77
|
-
const run = () => {
|
|
78
|
-
const header = getHeaderRows(vp);
|
|
79
|
-
if (!header)
|
|
80
|
-
return false;
|
|
81
|
-
const row = header[position.hierarchyRowIndex];
|
|
82
|
-
if (!row)
|
|
83
|
-
return false;
|
|
84
|
-
const headers = Array.from(row.querySelectorAll("[data-ln-header-range]"));
|
|
85
|
-
const match = headers.find((c) => {
|
|
86
|
-
const [colStartStr, colEndStr] = c.getAttribute("data-ln-header-range").split(",");
|
|
87
|
-
const colStart = Number.parseInt(colStartStr);
|
|
88
|
-
const colEnd = Number.parseInt(colEndStr);
|
|
89
|
-
return colStart <= position.colIndex && position.colIndex < colEnd;
|
|
90
|
-
});
|
|
91
|
-
if (match) {
|
|
92
|
-
match.focus();
|
|
93
|
-
grid.internal.focusActive.set((prev) => ({ ...prev, colIndex }));
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
return false;
|
|
97
|
-
};
|
|
98
|
-
if (!run()) {
|
|
99
|
-
setTimeout(() => {
|
|
100
|
-
if (!run()) {
|
|
101
|
-
setTimeout(() => run(), 20);
|
|
102
|
-
}
|
|
103
|
-
}, 8);
|
|
104
|
-
}
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
const columnCount = grid.state.columnMeta.get().columnsVisible.length - 1;
|
|
112
|
-
const colIndex = clamp(0, typeof position.column === "number" ? position.column : grid.api.columnIndex(position.column), columnCount);
|
|
113
|
-
focusCell({
|
|
114
|
-
colIndex,
|
|
115
|
-
rowIndex: position.row,
|
|
116
|
-
focusActive: grid.internal.focusActive,
|
|
117
|
-
id: grid.state.gridId.get(),
|
|
118
|
-
getRootCell: grid.api.cellRoot,
|
|
119
|
-
scrollIntoView: grid.api.scrollIntoView,
|
|
120
|
-
vp,
|
|
121
|
-
});
|
|
122
|
-
return false;
|
|
123
|
-
};
|
|
124
|
-
};
|