Filter table

const table = useReactTable({ columns: defaultColumns, data: projects?.filter(p=> p.archived && showArchived || !p.archived), getCoreRowModel: getCoreRowModel() })

This code whenever I change showArchived breaks the website, before I used React Table all worked properly, what is the right way to handle this?
Was this page helpful?