table icon indicating copy to clipboard operation
table copied to clipboard

how to open everything expanded at the start of the page in v7?

Open saneq1 opened this issue 7 years ago • 1 comments

https://codesandbox.io/s/tannerlinsleyreact-table-expanding-39kd7 now image need to at start image

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
  );

saneq1 avatar Aug 29 '19 09:08 saneq1

https://codesandbox.io/s/tannerlinsleyreact-table-expanding-o3rkm

tannerlinsley avatar Aug 29 '19 15:08 tannerlinsley