buttercup-desktop
buttercup-desktop copied to clipboard
Double-clicking on folders should toggle their open state
This is behavior I'm used to in most tree views.
Started with an implementation that add a double click handler to the tree-label since there is no double click handler on the tree nodes themselves; this however has the drawback that the double click doesn't fire on the icon, just the label.
Keeping an eye on this commit since it basically ads the functionality required. https://github.com/react-component/tree/pull/61/files
@sallar just for reference the intial implementation as described above : https://github.com/f0xy/buttercup/commit/649bf042fba8f667b712a2e0f6a539a7a2c04dc2
Thanks @f0xy, I will investigate this further. Maybe we should wait for the PR then?
@sallar I did request an update since the last activity was in Feb on that pull request.
If you're fine with the behaviour described above (regarding the click even not attached to the icon) let me know and I'll send in a merge.
Cheers :beers:
That is completely fine, so please send a PR :) Btw in the code example you linked here, you are pushing directly to this.props.expandedKeys
which is against Redux principles. You should use this.props.onExpand
function to set the correct expandedKeys
. But we can discuss this more over the PR :) Thanks!