iannbing / react-simple-tree-menu

A simple React tree menu component
MIT License
135 stars 48 forks source link

Add prop `keySeparator` #186

Open PRGfx opened 3 years ago

PRGfx commented 3 years ago

Introduce the option to split/join node paths by a character other than /.

It seems I had to go through the walk setup, which led to a lot of changes in the tests. I'm not convinced about defining the default separator in two places, but I am not sure where best to define such "shared" value.

Resolves #162

PRGfx commented 3 years ago

Hey, sorry for the delay, I don't really need this feature. I adjusted the test-case as you suggested. However openNodes needs to be ['item2/a', 'item2/a;b'] - I would have expected that it would open this path on its own, but that's for another topic.