buttercup-desktop icon indicating copy to clipboard operation
buttercup-desktop copied to clipboard

Double-clicking on folders should toggle their open state

Open lietu opened this issue 7 years ago • 5 comments

This is behavior I'm used to in most tree views.

lietu avatar Mar 28 '17 18:03 lietu

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

cillierscharl avatar Mar 31 '17 12:03 cillierscharl

@sallar just for reference the intial implementation as described above : https://github.com/f0xy/buttercup/commit/649bf042fba8f667b712a2e0f6a539a7a2c04dc2

cillierscharl avatar Apr 01 '17 02:04 cillierscharl

Thanks @f0xy, I will investigate this further. Maybe we should wait for the PR then?

sallar avatar Apr 01 '17 17:04 sallar

@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:

cillierscharl avatar Apr 01 '17 18:04 cillierscharl

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!

sallar avatar Apr 02 '17 13:04 sallar