minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to show an input text field so that I can enter data which can be rendered inside of the the treeview

gj1118 opened this issue · comments

Is your feature request related to a problem? Please describe.
I am trying to build a component that I can use to enter information in the treeview. This is what I am envisioning → https://share.getcloudapp.com/6quN2ePg , but unfortunately, I dont think I can add an input element since it expects
id, text, data , which at this point the new item will not have

Describe the solution you'd like
What I would like to have is the ability to create new items from the treeview

Describe alternatives you've considered
What I have done, is opening a new modal whenever the item is selected , but it has somewhat of a jarring experience. It is not as smooth as having an internal textview which can be used to create a new item for the treeview.

Please let me know if this ask is valid.

Thanks.

@gj1118 Thank you for your comment.
I understand what you want to do, but the current API does not cover this use case.
It would be possible to do something close by devising a custom node, but a new generic API would need to be designed and implemented in order to implement it correctly.