minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.
MIT License
519 stars 69 forks source link

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

Open gj1118 opened 1 year ago

gj1118 commented 1 year ago

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.

minop1205 commented 1 year ago

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