diff --git a/content/docs/ui/react-pages.mdx b/content/docs/ui/react-pages.mdx index 7f60c43fe7..8995d104b0 100644 --- a/content/docs/ui/react-pages.mdx +++ b/content/docs/ui/react-pages.mdx @@ -144,7 +144,7 @@ function Page() { $filter: ['status', '!=', 'paid'], $top: 200, }); - const records = Array.isArray(result) ? result : (result && result.records) || []; + const records = result?.data ?? result?.records ?? (Array.isArray(result) ? result : []); if (alive) setRows(records); })(); return () => { alive = false; }; @@ -156,8 +156,10 @@ function Page() { The `$` prefixes are load-bearing. An unprefixed `top:` or a `filters:` key is not a -query option — it is silently dropped, and the query comes back unfiltered or with the -default page size. There is no error. +query option — it is silently dropped, and the query runs as if you had not written +it: a dropped `filters:` comes back unfiltered, and a dropped `top:` comes back with +**every matching row**, because the list route has no default page size. The failure +mode is an unbounded read, not a truncated one. There is no error. `$filter` takes an ObjectQL filter array: `['field', 'op', value]`, with `and` / `or`