react-checkbox-tree
react-checkbox-tree copied to clipboard
Vertical layout option
Wondering if it is possible to have the same functionality but instead of having the top level nodes go from top to bottom, can it be vertical?
For example: Current layout is like this:
- RootLevel1
- Children
- RootLevel2
- Children
- RootLevel3
- Children
Is it possible to make it like this?
- RootLevel1 - RootLevel2 -RootLevel3
- Children - Children - Children
Thanks!
There is not an option currently.
For your desired layout, how would nested children be handled? I must admit I am somewhat struggling to imagine how it would play out. Would these children revert to what currently exists in this library, such that only the top level nodes are arranged differently from the rest?
That is, would this layout result in the following?:
- RootLevel1 - RootLevel2 - RootLevel3
- Child1 - Child1 - Child1
- NestedChild1 - Child2 - NestedChild1
- NestedChild2 - NestedChild1 - NestedChild2
- Child2 - NestedChild2 - Child2
@jakezatecky Yes, you have that layout correct; that is what I am looking for!
@kennyhuynh125 you could apply the style display: flex to the top-level ol element through CSS, such as:
.react-checkbox-tree > ol {
display: flex;
}
That should achieve the layout you are looking for. Is that an acceptable solution?