@jielga/tmdatagrid 2.0.0-beta.19 → 2.0.0-beta.20

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 CHANGED
@@ -307,6 +307,14 @@ type TMDataGridEditState = {
307
307
  }>;
308
308
  /** The draft store's delete slice: rows marked deleted, awaiting the save. */
309
309
  deletedRowIds: ReadonlyArray<string>;
310
+ /**
311
+ * `true` while `saveDrafts` is in flight - from the call until the
312
+ * consumer's callbacks (`onSaveDrafts`, or the per-row `onCommit` /
313
+ * `onRowAdd` / `onRowDelete` loop) have settled. Concurrent `saveDrafts`
314
+ * calls join the same run, so it flips once per run. It stays `false` for
315
+ * a save that finds nothing to send.
316
+ */
317
+ isSaving: boolean;
310
318
  };
311
319
  type ErasedRow$1 = Row<TMDataGridFeatures, TMDataGridRowData>;
312
320
  type ErasedColumn$1 = Column<TMDataGridFeatures, TMDataGridRowData, unknown>;
@@ -2421,9 +2429,10 @@ type UseTMDataGridOptions<TData extends RowData> = Omit<TableOptions<TMDataGridF
2421
2429
  enablePagination?: boolean;
2422
2430
  /**
2423
2431
  * Sends the grid back to the first page whenever the query changes - a
2424
- * column filter, the quick search or the sort. Defaults to `true` under
2425
- * `manualPagination` and `false` otherwise, where TanStack's own
2426
- * `autoResetPageIndex` already does it.
2432
+ * column filter, the quick search, the sort or the grouping. On by
2433
+ * default. TanStack's own `autoResetPageIndex` is switched off by the
2434
+ * grid: it fires on any change to the `data` array, which under
2435
+ * `editing.draft` is every commit.
2427
2436
  *
2428
2437
  * Server-side, `pageIndex` is a position in a result set the grid does not
2429
2438
  * own: narrowing the query leaves it pointing past the last page, and the
@@ -2976,8 +2985,10 @@ type TMDataGridDraftActionsState = {
2976
2985
  * Reads as `draftCount + openCount`; use whichever you meant.
2977
2986
  */
2978
2987
  pendingCount: number;
2979
- /** Whether a submit is in flight. */
2988
+ /** Whether a submit is in flight - any open row is submitting. */
2980
2989
  isSubmitting: boolean;
2990
+ /** `true` while `saveDrafts` is in flight. */
2991
+ isSaving: boolean;
2981
2992
  };
2982
2993
  /** What the edit chrome can do. */
2983
2994
  type TMDataGridDraftActionsActions = {