From ab836d1ab3b36471b99de645d5ec997a598921bf Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Mon, 26 Jun 2023 13:16:03 +0100 Subject: [PATCH] fix(www): update data-table-toolbar to correctly handle isFiltered (#702) * Update data-table-toolbar.tsx * style(www): run format:write --------- Co-authored-by: shadcn --- apps/www/app/examples/tasks/components/data-table-toolbar.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/www/app/examples/tasks/components/data-table-toolbar.tsx b/apps/www/app/examples/tasks/components/data-table-toolbar.tsx index 1bf54fe4c8..4f3fc61e9d 100644 --- a/apps/www/app/examples/tasks/components/data-table-toolbar.tsx +++ b/apps/www/app/examples/tasks/components/data-table-toolbar.tsx @@ -17,9 +17,7 @@ interface DataTableToolbarProps { export function DataTableToolbar({ table, }: DataTableToolbarProps) { - const isFiltered = - table.getPreFilteredRowModel().rows.length > - table.getFilteredRowModel().rows.length + const isFiltered = table.getState().columnFilters.length > 0 return (