nkbt/react-collapse

Collapse for table row

huseyn opened this issue · 3 comments

Collapse for table row
nkbt commented

I solved the problem for custom generic table by writing like this:

<tr>
                <td colSpan='4'>
                  <UnmountClosed isOpened={isCollapse}>
                    <table>
                      <tbody>
                        {collapseData.map((row, i) => {
                          return (
                            <tr className='cursor-pointer' key={i}>
                              {collapseColumns && collapseColumns.map(column => {
                                return <td key={column.objectKey + i}>{row[column.objectKey]}</td>
                              })}
                            </tr>
                          )
                        })}
                      </tbody>
                    </table>
                  </UnmountClosed>
                </td>
              </tr>
nkbt commented