react-complex-tree icon indicating copy to clipboard operation
react-complex-tree copied to clipboard

Context Menu For Each Folder And Item

Open hussain7006 opened this issue 1 year ago • 3 comments
trafficstars

Can you please add the OnContextMenu feature in the tree for each folder and item

hussain7006 avatar Mar 14 '24 07:03 hussain7006

Can you elaborate on what you suggest as a feature? react-complex-tree already allows customizing the render logic of tree items, you can just register your own context menu handlers there.

https://rct.lukasbach.com/docs/guides/rendering

lukasbach avatar Mar 14 '24 22:03 lukasbach

Yes, I created the context menu but not able to add the folder or items in a tree using context menu. Means context menu having the option create folder and delete folder etc. Thanks

On Fri, 15 Mar 2024, 3:58 AM Lukas Bach, @.***> wrote:

Can you elaborate on what you suggest as a feature? react-complex-tree already allows customizing the render logic of tree items, you can just register your own context menu handlers there.

https://rct.lukasbach.com/docs/guides/rendering

— Reply to this email directly, view it on GitHub https://github.com/lukasbach/react-complex-tree/issues/349#issuecomment-1998614522, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDG6XL5Y2GJ7C6HKPXCQ43YYITQFAVCNFSM6AAAAABEVSFKUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGYYTINJSGI . You are receiving this because you authored the thread.Message ID: @.***>

hussain7006 avatar Mar 14 '24 23:03 hussain7006

As mentioned, you can customize the render logic and add custom logic to your rendered elements like context menus from there. If you want changes to the tree structure to be possible, you need to manage the state of the tree externally, and let RCT know of any changes done through change events. There are multiple ways for how to do this, this page documents how to do this for static tree data providers for example: https://rct.lukasbach.com/docs/guides/static-data-provider

lukasbach avatar Mar 27 '24 11:03 lukasbach