@jielga/tmdatagrid 1.1.0 → 1.1.1
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.d.ts +21 -5
- package/dist/index.js +1612 -1592
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/appearance/SKILL.md +1 -1
- package/skills/cell-selection/SKILL.md +1 -1
- package/skills/columns/SKILL.md +1 -1
- package/skills/data/SKILL.md +1 -1
- package/skills/editing/SKILL.md +19 -29
- package/skills/editing/references/editing-api.md +4 -1
- package/skills/editing/references/editors-and-validation.md +7 -1
- package/skills/filtering/SKILL.md +1 -1
- package/skills/getting-started/SKILL.md +1 -1
- package/skills/grouping/SKILL.md +1 -1
- package/skills/options/SKILL.md +1 -1
- package/skills/rows/SKILL.md +10 -5
- package/skills/server-side/SKILL.md +1 -1
- package/skills/testing/SKILL.md +1 -1
- package/src/tmdatagrid/components/TMDataGridCellEditor.tsx +1 -1
- package/src/tmdatagrid/components/TMDataGridTable.tsx +116 -23
- package/src/tmdatagrid/core/editEngine.ts +28 -20
package/dist/index.d.ts
CHANGED
|
@@ -352,12 +352,19 @@ type TMDataGridEditRowProjection = {
|
|
|
352
352
|
* reads a form's store directly - it is mounted for one cell at a time.
|
|
353
353
|
*/
|
|
354
354
|
type TMDataGridEditState = {
|
|
355
|
-
/**
|
|
355
|
+
/**
|
|
356
|
+
* The cell the last open gesture named - where the caret goes. In row mode
|
|
357
|
+
* the whole row is editing whatever this says, so there it is only the
|
|
358
|
+
* caret's cell, and `null` for the lane's pencil, which names no column.
|
|
359
|
+
*/
|
|
356
360
|
active: {
|
|
357
361
|
rowId: string;
|
|
358
362
|
columnId: string | null;
|
|
359
363
|
} | null;
|
|
360
|
-
/**
|
|
364
|
+
/**
|
|
365
|
+
* Rows with a live form. In cell mode at most one; in row, cellConfirm and
|
|
366
|
+
* batch, as many as the user opened - which rows are editing.
|
|
367
|
+
*/
|
|
361
368
|
openRowIds: ReadonlyArray<string>;
|
|
362
369
|
rows: Record<string, TMDataGridEditRowProjection>;
|
|
363
370
|
/** Phase 4 - rows being created, not yet in `data`. */
|
|
@@ -395,8 +402,13 @@ type TMDataGridEditorArgs = {
|
|
|
395
402
|
cancel: () => void;
|
|
396
403
|
size: TMDataGridSize;
|
|
397
404
|
/**
|
|
398
|
-
*
|
|
399
|
-
*
|
|
405
|
+
* @deprecated The grid places the caret itself, once per open gesture, so
|
|
406
|
+
* honouring this is optional and it will go in the next major. It focuses
|
|
407
|
+
* `data-dg-part="editor-input"` when the editor publishes it and the first
|
|
408
|
+
* focusable element inside the editor otherwise, which is why a custom
|
|
409
|
+
* editor that ignores this prop still gets the caret. False under
|
|
410
|
+
* `editMode: "row"`, where a whole row of editors is mounted at once and
|
|
411
|
+
* only the named cell may take it.
|
|
400
412
|
*/
|
|
401
413
|
autoFocus: boolean;
|
|
402
414
|
/**
|
|
@@ -471,7 +483,11 @@ type TMDataGridEditApi = {
|
|
|
471
483
|
canEditCell: (row: ErasedRow, column: ErasedColumn) => boolean;
|
|
472
484
|
/** Whether the row takes edits at all - the edit lane's pencil gate. */
|
|
473
485
|
canEditRow: (row: ErasedRow) => boolean;
|
|
474
|
-
/**
|
|
486
|
+
/**
|
|
487
|
+
* Opens an editor. In row mode the whole row opens either way and `columnId`
|
|
488
|
+
* only says which cell takes the caret; `null` (the lane's pencil) leaves it
|
|
489
|
+
* to the row's first editable cell.
|
|
490
|
+
*/
|
|
475
491
|
begin: (target: {
|
|
476
492
|
rowId: string;
|
|
477
493
|
columnId: string | null;
|