-
Notifications
You must be signed in to change notification settings - Fork 917
Childless Nodes #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Childless Nodes #402
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Will merge after documentation is added to the README @ksaxberg
@wuweiweiwu Added a quick blurb to the README about the new prop:
Thanks for pointing out that I missed adding it to the README! |
Awesome! thanks again @ksaxberg |
Will update the thread when it released |
@wuweiweiwu how often do you do releases? Thanks |
@grydstedt @ksaxberg released in 2.3.0!!! |
Thanks! |
Let me know if there is any additional information you need, either in this PR or about these changes!
We're looking to utilize this awesome package, but we need an additional feature. The filesystem theme is great, but you can preview dropping a file into another file. This drop is rejected, which is nice, but we shouldn't really allow users to preview a file being underneath another file. The custom hover implementation is awesome, and adding a little more control over the hover state would allow us to use the package to the fullest extent.
Did some digging to try and figure out where this change would be sensible. Having a parameter to the
SortableTree
would be nice, and it needs to be called over in thedndManager
. So I added thecanNodeHaveChildren
property function, which defaults to true.Preview of Example
Here's a quick gif preview of using the new story with "people" nodes as not being able to have children, but other nodes being able to.