Cheatsheets and messagesMessages
Server rows messages
Look up the warnings and errors of useDataGridServerRows, 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.
Server rows warnings
useDataGridServerRows prints its own prefix.
| Message | What to do | Page |
|---|---|---|
[data-grid-server] the answer of fetchRows uses total or hasNextPage; rename them to totalRowCount and hasMore | Rename the fields of the answer. | Server rows contract |
[data-grid-server] fetchRows returned a duplicate row id; only the first row of each id is used, so make the sort total (add the row id as a last sort key) | Add the row id as the last sort key on the server. | Server rows contract |
[data-grid-server] fetchRows returned <n> rows for a request of <limit>; only the first <limit> are used | Return at most the number of rows that the request asks for. | Server rows contract |
[data-grid-server] mode changed from "<mode>" to "<mode>"; the mode is fixed for the life of the hook, so remount it with a key | Give the component a key that changes with the mode. | Server rows options |
[data-grid-server] an edit to row "<rowId>" was dropped because the row was evicted before the change merged; this hook does not own persistence, so keep the edit in your own cache | Save the edit to your backend or your cache before the grid evicts the row. | Tune row retention |
[data-grid-server] totalRowCount must be a non-negative integer or null; treating the count as unknown | Return a whole number of zero or more, or null, as totalRowCount. | Server rows contract |
[data-grid-server] totalRowCount <count> is above <max>; using <max> | Return a smaller totalRowCount. The grid uses the maximum. | Row limits |
[data-grid-server] fetchRows returned <n> rows for rows [<start>, <end>); only those rows count as loaded and the rest stay unloaded | Return every row of the requested range, or fewer only at the end of the result. | Server rows contract |
[data-grid-server] an insert, delete, or move reached a grouped source and was ignored; the server places rows while the grid is grouped | Change the rows on the server, then call refresh(). A grouped source accepts edits to loaded rows only. | Server rows contract |
[data-grid-server] source: "sequential" has no effect while grouped: groups load by offset. Use source: "random" (or omit it) with groupBy. | Leave source unset or set it to "random" while the spec groups. | Group server rows |
[data-grid-server] prefetchNextPage has no effect while groupBy is set: a grouped page loads when the pager moves to it | Remove prefetchNextPage while the spec groups. | Group server rows |
[data-grid-server] the open groups hold more than 10000000 view rows; the view stops at 10000000. Collapse a group or add a filter | Collapse a group or add a filter. | Group server rows |
fetchRows answered groups that shifted twice since the last reload; make the group order total | Order the groups by a total key, so a block never repeats a group of another block. | Server rows contract |
[data-grid-server] initialAnswer holds more than blockSize (<n>) rows; only the first block is used | Pass the rows of block 0 only, at most blockSize rows. | Load rows while scrolling |
[data-grid-server] fetchRows returned an empty block with a next cursor; an empty block ends the source, so return rows or a null cursor | Return rows, or return a null cursor. | Load without row count |
[data-grid-server] fetchRows answered the cursor it was sent; the source ends here, so return a new cursor or null | Return a new cursor or null. | Load without row count |
[data-grid-server] fetchRows returned a cursor it returned before; the source ends here, so return a new cursor or null | Return a new cursor or null. | Load without row count |
[data-grid-server] the source loaded <max> rows; it ends here | Narrow the result on the server. | Row limits |
[data-grid-server] <label> threw | Fix the error in the named callback. The grid prints the error after the text. This one is a console error. | Server rows options |
[data-grid-server] pages mode has more rows than one page, but nothing read pager; spread server.pager onto DataGridPaginationBar or control page | Spread server.pager onto DataGridPaginationBar, or control page. | Server rows example |
[data-grid-server] maxLoadedRows must be a number of rows or Infinity, so the hook uses <default> | Pass a number of rows or Infinity as maxLoadedRows. | Tune row retention |
[data-grid-server] source is "random" but fetchRows answered without a totalRowCount; the rows end at this block. Answer the count with every block | Answer totalRowCount with every block, or set source: "sequential". | Load without row count |
[data-grid-server] revalidateIntervalMs must be a number of milliseconds above 0, so revalidation is off | Pass a number of milliseconds of at least 1000 as revalidateIntervalMs. | Tune row retention |
[data-grid-server] revalidateIntervalMs below <min> ms is raised to <min> ms | Pass at least 1000 as revalidateIntervalMs. | Tune row retention |
[data-grid-server] reshapeDelayMs must be a number of milliseconds above 0, so the reshape delay is off | Pass a number of milliseconds of at least 250 as reshapeDelayMs. | Push into a server-ordered view |
[data-grid-server] reshapeDelayMs below <min> ms is raised to <min> ms | Pass at least 250 as reshapeDelayMs. | Push into a server-ordered view |
[data-grid-server] a timed refresh was skipped because the rendered rows of a sequential source end beyond 10 blocks; call refresh() yourself, and read canRevalidate() to know when it applies | Call refresh() yourself while canRevalidate() returns false. | Refresh server rows |
[data-grid-server] refreshAfterSave threw | Fix the function that you passed as refreshAfterSave. The grid prints the error after the text. This one is a console error. | Save edits |
Related
- Message index: all message pages
- Labels and i18n: change the text the grid shows
- Troubleshoot server data: fix a server data problem