Cheatsheets and messagesMessages
Setup and keymap messages
Look up the warnings about grid setup, column definitions, and the keymap, and fix their cause.
Most console warnings print only in a development build, and most print once. A word in angle brackets, such as <id>, stands for a value that the grid fills in. A message that ends in ... continues past the text that the table quotes. The tables leave out the backticks that some messages put around prop names.
Setup warnings
These warnings come from the props that you pass to the grid.
| Message | What to do | Page |
|---|---|---|
[data-grid] both data and defaultData were provided; data wins (controlled) and defaultData is ignored | Pass one of the two props. data keeps the rows in your state, and defaultData seeds the grid once. | DataGrid props |
[data-grid] both selection and defaultSelection were provided; selection wins (controlled) and defaultSelection is ignored | Pass one of the two props. | Selection and cell events |
[data-grid] <seed> threw, so the grid keeps its first state: <error> | Catch the error inside the function seed, for example around JSON.parse of stored text. | Remember filters and layout |
[data-grid] <seed> is ignored because <state> is controlled. Seed the owner of <state> instead; for a server grid, pass defaultSpec to useDataGridServerRows. | Remove the default* prop, or seed the owner of the controlled state. Under useDataGridServerRows, pass defaultSpec. | Remember filters and layout |
[data-grid] <DataGridProvider store={…}> ignores the sync props next to it; pass them to useDataGridStoreProps instead | Pass every prop to useDataGridStoreProps and pass only store to the provider. | DataGridProvider |
[data-grid] duplicate column id "<id>" | Give every column its own id. | ColumnDef |
[data-grid] column "<id>" has type "<type>" which resolves to nothing in the cellTypes registry (a typo, or a null entry removed it); it renders as text and its edits, pastes, and deletes are dropped | Fix the type key or register the cell type. | ColumnDef |
[data-grid] column "<id>" has a node header with no plain text; set headerText so menus, export, and assistive technology can name it | Set headerText on the column. | Column headers and groups |
[data-grid] column "<id>" has neither accessorKey nor accessorFn | Give the column an accessorKey or an accessorFn. defineColumns prints this warning. | ColumnDef |
[data-grid] columns array identity changed since the last render; pass a stable reference (e.g. useMemo) or every row re-renders | Define columns outside the component or wrap it in useMemo. | Define columns |
[data-grid] data array identity changed with no row changes; pass a stable reference (rebuilding it every render defeats row memoization) | Keep the data array in state and do not rebuild it on every render. | DataGrid props |
[data-grid] data is controlled and no onDataChange receives this change, so the grid drops it on the next render. Pass onDataChange, use defaultData, or set readOnly. | Pass onDataChange and store the array it receives, seed the grid with defaultData, or set readOnly. A grid with onSave does not warn. | Keep edits in state |
[data-grid] the <pin|hidden> of column "<columnId>" changed in a new columns array, and a known column id keeps its runtime <pin|hidden>; call <setColumnPin|setColumnHidden>, or control the layout with columnLayout | Call setColumnPin or setColumnHidden, or pass the pins and the hidden columns through columnLayout. | Column order and pinning |
[data-grid] getRowId returns other ids but data kept its array; pass a new data array together with a new getRowId | Change getRowId and data in the same render. | DataGrid props |
[data-grid] getRowId returns other ids but the grid keeps its seeded rows; remount the grid with a new key to apply a new getRowId | Remount the grid with a new key, or pass data instead of defaultData. | DataGrid props |
[data-grid] defaultData seeds the grid once and ignores later changes, so these rows do not show; pass them in data with onDataChange, or remount the grid with a new key | Pass the rows in data with onDataChange, or remount the grid with a new key. | DataGrid props |
[data-grid] a second DataGridRoot mounted on a store that another root already serves; the last mount takes the keyboard, scroll, and focus commands. Give each grid its own store. | Give each DataGridRoot its own store, or mount one root per provider. | DataGrid props |
[data-grid] The grid has no accessible name. Set aria-label or aria-labelledby on the grid. | Set aria-label or aria-labelledby on the grid. | Accessibility gaps |
[data-grid] a sort or filter names an unknown column (its id is not in columns), so the grid ignores it | Use ids of columns that exist. The grid keeps the other sorts and filters. | Sorting |
[data-grid] updateCells and updateRows need a source, so this call is refused. Pass source: "stream" for a push from your server, or source: "edit" for a user edit | Pass source: "stream" for a push, or source: "edit" for a user edit. The verdict skips each patch with the reason "no-source". | Push live values |
[data-grid] the untyped column "<columnId>" sorts numbers and text together, so its numbers sort before its text. Set type on the column, or give it one value type. | Set type on the column, or keep one value type in it. The grid prints this once for each column. | Sorting |
[data-grid] checkedRowsLifetime="across-filters" falls back to "until-cleared" <reason> | The reason names the cause: unloaded rows, or sortMode or filterMode set to "server". The grid does not remember hidden checked rows there. Set totalRowCount on a server grid. | Checked rows |
[data-grid] onGateAborted threw: <error> | Catch the error inside onGateAborted. The grid logs it as a console error and goes on. | Gate cancellation and timeouts |
[data-grid] onSelectionChange threw: <error> | Fix the error in onSelectionChange. The grid prints the error after the text, and its other updates still run. This one is a console error. | Event shapes |
[data-grid] onActiveCellChange threw: <error> | Fix the error in onActiveCellChange. The grid prints the error after the text, and its other updates still run. This one is a console error. | Event shapes |
[data-grid] onEditEnd threw: <error> | Fix the error in the onEditEnd of an edit that a view change ends. The grid prints the error after the text, and its other updates still run. This one is a console error. | Event shapes |
[data-grid] select all matching is cleared: more than 100000 rows were excluded | Uncheck fewer rows while all matching is on, or narrow the filter and select all matching again. | Select server rows |
[data-grid] remembered checked rows are capped at 100000; the rest are dropped | The grid remembers at most 100,000 hidden checked rows. | Checked rows |
[data-grid] invalid date format options, showing the ISO text: <error> | Fix the displayFormat or locale of the date column. | Built-in cell types |
[data-grid] invalid number format options, showing the raw value: <error> | Fix the format options of the number column. | Built-in cell types |
[data-grid] <sortLocale|locale> "<tag>" is not a valid language tag. The grid sorts with "en-US". | Pass a BCP 47 tag, such as "sv-SE", to the prop that the message names (sortLocale or locale). | Sorting |
[data-grid] <sortLocale|locale> "<tag>" is not supported by this runtime. The grid sorts with "en-US". | Pass a tag that Intl.Collator.supportedLocalesOf lists to the prop that the message names (sortLocale or locale). | Sorting |
[data-grid] withSortLocale received a promise. The sort locale scope ends when the callback returns, so work after an await sorts with the default locale. Pass a synchronous callback. | Pass a synchronous callback to withSortLocale. Work after an await sorts with "en-US". | Sorting |
[data-grid] autosizeColumns: unknown column id "<id>" | Pass column ids that exist. | Column sizing |
[data-grid] <action> found no <trigger> for "<id>"; wire <slot> to enable it | Render the header menu or header filter that the slot prop names. | DataGrid props |
[data-grid] column "<id>": <old key> moved to <new key> (filter: { <member> }); the flat key is still read, rename it | Move filterOperators, filterMatch, and filterCompare into the column's filter object. | Filtering |
Keymap warnings
These warnings come from the keymap and commands props.
| Message | What to do | Page |
|---|---|---|
[data-grid] keymap binding "<binding>" for action "<action>": <issues> | Fix the binding. The issues name the problem: an empty, unknown, or repeated modifier, a missing key, or an unknown key name. Key names match exact case, for example ArrowUp. | Shortcut remapping |
[data-grid] keymap binding "<binding>" is bound to multiple actions (<actions>); the most specific binding wins; on a tie a keymap binding beats a default. Assign distinct combos to keep every action reachable. | Give each action its own key combination. | Shortcut remapping |
[data-grid] keymap action "<action>" has no built-in handler and no custom command; the binding is a no-op | Add a commands entry for the action or remove the binding. The grid warns when it reads the keymap, once for each action. | Plugin commands and shortcuts |
[data-grid] global shortcut binding(s) without Ctrl/Cmd never fire outside the grid (<bindings>); add mod+ to the binding or handle the key in your own window listener | Add mod+ to the binding, or handle the key in your own window listener. | Global shortcuts |
[data-grid] commands shadows built-in action(s) <names>; the command wins and the built-in no longer dispatches | Rename the command if you want the built-in action to keep working. | Plugin commands and shortcuts |
[data-grid] commands <names> have no key: the add-on that binds the key is not mounted; bind the action in the keymap, for example keymap={{ <name>: ["<key>"] }} | Add the action to the keymap prop, or mount its add-on. undo, redo, fillDown, fillRight, openFind, openFindReplace, and openKeybindings have no key of their own in the core. Their add-on binds them. | Plugin commands and shortcuts |
Related
- Message index: all message pages
- Labels and i18n: change the text the grid shows
- Troubleshoot server data: fix a server data problem