gridcn2.0.0
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.

MessageWhat to doPage
[data-grid-server] the answer of fetchRows uses total or hasNextPage; rename them to totalRowCount and hasMoreRename 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 usedReturn 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 keyGive 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 cacheSave 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 unknownReturn 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 unloadedReturn 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 groupedChange 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 itRemove 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 filterCollapse a group or add a filter.Group server rows
fetchRows answered groups that shifted twice since the last reload; make the group order totalOrder 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 usedPass 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 cursorReturn 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 nullReturn 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 nullReturn a new cursor or null.Load without row count
[data-grid-server] the source loaded <max> rows; it ends hereNarrow the result on the server.Row limits
[data-grid-server] <label> threwFix 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 pageSpread 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 blockAnswer 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 offPass a number of milliseconds of at least 1000 as revalidateIntervalMs.Tune row retention
[data-grid-server] revalidateIntervalMs below <min> ms is raised to <min> msPass 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 offPass 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> msPass 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 appliesCall refresh() yourself while canRevalidate() returns false.Refresh server rows
[data-grid-server] refreshAfterSave threwFix the function that you passed as refreshAfterSave. The grid prints the error after the text. This one is a console error.Save edits

On this page