rsuite/rsuite-table

Dynamic column width depends on level

Edymov opened this issue · 1 comments

Hello!
Is it a way to create a custom column with dynamic width. I need it to render correct tree toggle. Tree has up to 8 levels deep

Hi @Edymov
You can get the depth of the tree in rowData through the onExpandChange callback, and then dynamically set the column width.

onExpandChange: (expanded: boolean, rowData: Row) => void;