react-treebeard icon indicating copy to clipboard operation
react-treebeard copied to clipboard

Separating header click action from toggle click action

Open LuisPinaSoares opened this issue 7 years ago • 7 comments

Hi,

We had the need for a feature. Which is being able to have separated action capabilities for toggle clicking and header clicking (Having only a onToggle blocks that). For us it seemed a pretty core feature for a thing like a tree. We have an implementation that adds this feature, does anyone else has this need?

Does it make sense to make a PR?

LuisPinaSoares avatar Apr 03 '19 17:04 LuisPinaSoares

Hi @LuisPinaSoares I need that feature. Do you think to open a pull request or could you show that how do you implement it?

metehansenol avatar Jun 30 '19 14:06 metehansenol

@metehansenol My fork supports that feature. https://github.com/dotneet/react-treebeard/blob/master/example/app.js

dotneet avatar Jul 03 '19 04:07 dotneet

Hi @metehansenol , it didn't made sense for me to override a lot of stuff. In the end, i just created a tree from scratch 100 lines of code or so were enough.

LuisPinaSoares avatar Jul 03 '19 07:07 LuisPinaSoares

@dotneet Why don't you send a PR with that feature?

maximilianoforlenza avatar Aug 18 '19 13:08 maximilianoforlenza

@maximilianoforlenza Can you accept the following changes? If so I will make a PR. https://github.com/dotneet/react-treebeard/commit/3df4a649f6580f55ecd3664723573b62de598a11

dotneet avatar Aug 18 '19 14:08 dotneet

@dotneet yes, please change the unit tests if these fail

maximilianoforlenza avatar Aug 18 '19 14:08 maximilianoforlenza

@maximilianoforlenza I've created a PR. Please review it. https://github.com/storybookjs/react-treebeard/pull/229

dotneet avatar Aug 19 '19 00:08 dotneet