I’m looking at tackling issue #5876 and would appreciate some guidance on defining the solution.
I would like the same behavior in a custom tree widget and I could see future views potentially requiring this too. For that reason, I think a general solution would be a good choice. The outline tree could then use this general solution.
I see two potential solutions.
- Do as VS code does and add a new prop to TreeProps to enable/disable this new behavior in a TreeWidget. See VS code IAbstractTreeOptionsUpdate.
- Create a new class that extends TreeWidget by overriding just a few of the functions. Namely, doToggle, renderExpansionToggle, and handleClickEvent.
I have successfully implemented solution 2 locally, but feel solution 1 may be the better choice in terms of generality.
Which solution do you think makes the most sense? Is there an alternative solution that is better?