maheshsenni / react-treelist

A React treelist component to display data in tree structure. (NOT MAINTAINED)
https://maheshsenni.github.io/react-treelist/
MIT License
28 stars 17 forks source link

Does this component support collapse functionality in columns? #7

Open rgabs opened 7 years ago

rgabs commented 7 years ago

First of all, this component is really good. Thank you for it. I saw an option in column-options called expand but I am not able to figure out how to use it. Can you explain the use of expand option in column?

maheshsenni commented 7 years ago

Thank you for the kind words.

By default, the expand/collapse icon appears in the first column of the tree list. There could be cases where you would want the icon to be displayed in a different column and that is what expand option does.

I have updated one of the demos to use this option. Is this what you are expecting?

Demo

rgabs commented 7 years ago

Got it. Thank you for the quick reply. However, in my case the requirment is to have both collapsible rows and columns. I am thinking of changing the data to make the columns collapsible. Thoughts?

maheshsenni commented 7 years ago

I am afraid, changing the configuration would be the only possible way to do it right now. I had plans to add a column menu which would provide controls for adding/removing columns, but couldn't find time to implement it.