diff --git a/apps/www/src/content/docs/components/datatable/index.mdx b/apps/www/src/content/docs/components/datatable/index.mdx index 47ac6fee2..e865648c1 100644 --- a/apps/www/src/content/docs/components/datatable/index.mdx +++ b/apps/www/src/content/docs/components/datatable/index.mdx @@ -235,6 +235,7 @@ When grouping is enabled, you can make the current group label stick under the t ```tsx function ServerTable() { const [data, setData] = useState([]); + const [totalRowCount, setTotalRowCount] = useState(); const [query, setQuery] = useState(); const [isLoading, setIsLoading] = useState(false); const handleQueryChange = async (query: DataTableQuery) => { @@ -242,11 +243,13 @@ function ServerTable() { setQuery(query); const response = await fetchData(query); setData(response.data); + setTotalRowCount(response.totalRowCount); setIsLoading(false); }; return (