table
table copied to clipboard
how to open everything expanded at the start of the page in v7?
https://codesandbox.io/s/tannerlinsleyreact-table-expanding-39kd7
now
need to at start

I've tried then the switches do not work Uncaught TypeError: setState is not a function
let expanded = React.useMemo(() =>[{"0":false, "1": true}], [data]);
const {getTableProps, headerGroups, rows, prepareRow} = useTable(
{
columns: userColumns,
data,
subRowsKey: "matchings",
state: [{expanded}],
},
useExpanded
);
https://codesandbox.io/s/tannerlinsleyreact-table-expanding-o3rkm