Cheatsheets and messages
Actions A to Z
Find a store action by name, read what it does, and open the page that explains its feature.
Each row is a method of DataGridActions. useDataGridActions() and api.actions return the same object. An action with a CellRef takes a row id and a column id. A cell action that ends in At takes a ViewCoord, a position in view indexes. A row action that ends in At (setRowCheckedAt, deleteRowsAt, duplicateRowsAt) takes view row numbers: one number, or a number[].
| Action | Purpose | Page |
|---|---|---|
applyCellUpdates | Writes values at view coordinates as one change with the given source, and selects the touched cells. | Store hooks |
autosizeColumns | Sizes columns to their content over the view and returns the measured widths. On a paged grid, it measures the shown page. | Column sizing |
cancelColumnResize | Ends a resize drag without a commit and restores the width the drag started from. Fires onColumnResizing. | Store hooks |
cancelEditing | Discards the open edit. It writes nothing. | Edit and validation events |
canSetColumnOrder | Returns the result that setColumnOrder returns for the same arguments, without the move. | Exported types |
checkRowRange | Checks or unchecks the rows from the anchor row to a target view index. | Store hooks |
clearCellErrors | Clears the cell errors of targets. Without targets, it clears every cell error. | Show errors on cells |
clearCellSelection | Clears the cell ranges and the column selection, and keeps the checked rows. | Store hooks |
clearSaveStatus | Drops the "failed" mark of each row whose save the server refused. A row that is still "saving" keeps its mark. | Save edits |
clearSelection | Clears the cell ranges, the column selection, and the checked rows. | Checked rows |
collapseAll | Closes every group. | Row grouping |
commitCellEdit | Validates and commits the open edit. A refused value keeps the editor open. A commit moves the active cell by movement. | Store hooks |
commitCellValue | Validates and writes a value at a CellRef without an edit session, as a checkbox does. | Store hooks |
commitCellValueAt | Takes a ViewCoord in place of the CellRef of commitCellValue. | Store hooks |
commitChange | Applies a whole DataChange in one write and fires onDataChange once. | Data change events |
deleteRows | Deletes the rows with the given ids, as one change. The grid skips an id that matches no row. Returns a RowActionResult. | Row operations |
deleteRowsAt | Deletes the rows at the given view indexes, as one change. Returns a RowActionResult. | Row operations |
deleteSelection | Clears every editable cell of the selection to its empty value, as one change. | Store hooks |
duplicateRows | Duplicates the rows with the given ids through duplicateRow, as one change. Returns a RowActionResult. | Row operations |
duplicateRowsAt | Duplicates the rows at the given view indexes through duplicateRow, as one change. Returns a RowActionResult. | Row operations |
editRows | Writes whole-row patches as a user edit: source: "edit", one undo entry, and one onSave. The readOnly, read-only column, and validate checks apply. | Edit rows in forms |
expandAll | Opens every group. | Row grouping |
extendSelection | Grows or shrinks the main range by one cell in a direction, or moves its edge to the edge of the view with toEdge. | Store hooks |
extendTo | Extends the selection to the cell named by the stable CellRef. | Store hooks |
extendToAt | Takes a ViewCoord in place of the CellRef of extendTo. | Store hooks |
flashCells | Plays the fade pulse on the given cells. It is not a data change. | Push live values |
insertRow | Inserts one row from createRow above or below a view index. Returns a RowActionResult. | Row operations |
insertRows | Inserts count rows from createRow above or below a view index, as one change. Returns a RowActionResult. | Row operations |
moveRowsBy | Shifts rows by delta and keeps the gaps between them. Returns whether rows moved. | Row order |
previewColumnWidth | Writes a column width while a resize drag moves. Fires onColumnResizing. | Column sizing |
pushRange | Adds a new range at a CellRef, as a Ctrl or Cmd click does. | Store hooks |
pushRangeAt | Takes a ViewCoord in place of the CellRef of pushRange. | Store hooks |
reconcileView | Rebuilds the view index that a deferred updateCells postponed, and clears viewStale. | Push live values |
reorderRows | Moves rows as one block to a view index. Returns whether rows moved. | Row order |
replaceRowId | Swaps the id of a row for the id that the server assigned, in one write. | Save edits |
replaceRowIds | Swaps the ids of many rows in one write, with one onDataChange. | Save edits |
resetColumnLayout | Restores the widths, order, pins, and hidden columns of the column definitions in one change. | Save a column layout |
resetColumnWidth | Drops the width override of a column, so the column gets its width from the definition again. | Column sizing |
selectAll | Runs one step of the select-all shortcut. The first call selects the filled block around the active cell, and a repeat selects every cell. | Global shortcuts |
selectAllMatching | Checks every row of the result: every page of a client-paged grid, or every row of a server result, loaded or not. It returns { ok: true }, or { ok: false, reason } and changes nothing. | Select server rows |
selectCell | Selects the cell named by the stable CellRef as a single-cell selection. | Exported types |
selectCellAt | Takes a ViewCoord in place of the CellRef of selectCell. | State and view index |
selectColumn | Selects the column at a view column index, as a click on its header does. | Shortcut remapping |
selectRow | Selects the row at a view index, as a click on its row marker does. | Row markers |
setActiveCell | Moves only the active cell to a CellRef and keeps the selection. null clears it. Fires no onSelectionChange. | Store hooks |
setActiveCellAt | Takes a ViewCoord in place of the CellRef of setActiveCell. | Store hooks |
setAllRowsChecked | Checks or unchecks every row of the view, as the header checkbox does. On a paged grid, the view is the shown page. With totalRowCount, checkedRowsLifetime='across-filters', and unloaded rows in the view, checking selects all matching. | Client pagination |
setCellErrors | Merges server errors into the cell errors. It is not a data change. | Show errors on cells |
setColumnLayout | Applies a partial ColumnLayout as one commit. Omitted parts keep their value. | Column order and pinning |
setColumnOrder | Moves a column, or a column group, before or after another column. Returns { ok: true }, or { ok: false, reason } when the order stays. | Column order and pinning |
setColumnPin | Pins a column to "start" or "end", or unpins it with null. | Column order and pinning |
setColumnWidth | Sets a column width and fires onColumnLayoutChange once, as a resize release does. | Column sizing |
setExpanded | Sets the open groups. | Row grouping |
setFilterJoin | Sets how the top-level filters combine and emits onFilterJoinChange. A controlled grid only emits. | Filtering |
setFilters | Replaces the filter tree. | Filtering |
setGroupBy | Sets the group columns. Unknown, groupable: false, and repeated ids drop. | Row grouping |
setPage | Shows a page of the view. Pages start at 1. Calls onPageChange. | Client pagination |
setPageSize | Shows pageSize rows per page and keeps the first row of the page on screen. null shows every row for an uncontrolled page size. | Client pagination |
setRowChecked | Checks or unchecks one row by id. It sets the state and never toggles. | State and view index |
setRowCheckedAt | Checks or unchecks one row by view index. It sets the state and never toggles. | State and view index |
setSearch | Sets the quick-search text. With options, it also sets the search options. | Quick search |
setSelection | Applies a whole SelectionState in CellRef terms. null clears the selection. | Selection and cell events |
setSorts | Replaces the active sorts. | Sorting |
startEditing | Opens an editor at a CellRef, with optional first text. | Edit and validation events |
startEditingAt | Takes a ViewCoord in place of the CellRef of startEditing. | Store hooks |
toggleGroup | Opens a closed group and closes an open one. | Row grouping |
toggleGroupBy | Adds the column as the innermost group level, or removes it. | Row grouping |
toggleSort | Steps the sort of a column to the next direction or to no sort, as a header click does. { additive: true } keeps the other sorts. | Sort and filter events |
updateCells | Writes cell patches by row id in one write, without a view rebuild. Default source is "stream". | Push live values |
updateRows | Writes whole-row patches by row id. Each RowPatch expands to one cell patch per column, as in updateCells. | Push live values |
Related
- Store hooks: the hook that returns the actions
- State and view index: row ids and view indexes
- Hooks A to Z: hooks by name