Skip to content
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

enviroment ref is missing startRenamingItem action #394

Open
agmtab opened this issue Jun 18, 2024 · 2 comments
Open

enviroment ref is missing startRenamingItem action #394

agmtab opened this issue Jun 18, 2024 · 2 comments
Assignees

Comments

@agmtab
Copy link

agmtab commented Jun 18, 2024

Is your feature request related to a problem? Please describe.
There are scenarios where someone might want to call the action startRenamingItem available in tree ref through the environment ref passing the itemId and treeId

Describe the solution you'd like
Expose the startRenamingItem action in environment ref

Describe alternatives you've considered
Adding ref for each tree

@lukasbach
Copy link
Owner

Unfortunately, the currently renamed item and the search string are currently stored in the tree component tree, not the environment, so the environment can't currently see or influence that value for arbitrary trees.

If this is a relevant issue for several others, we could consider moving those props (or the renaming item property alone) into the viewstate of the environment, but since this would require quite a bit of refactoring and involves a complexity and small performance overhead, I would rather not implement this unless necessary.

@kamilkazmierczakMtab
Copy link
Contributor

Problem that we have with using that function from tree ref is that we dynamically generate trees and we were able to manipulate with them using other functions like expandAllItems, collapseAllItems, selectItems and they all take treeId as parameter. It is possible for us to maintain reference to all the refs of the trees we have and call it on proper ref, it would just be nicer experience to to be able to just call it on environment ref, but if you are saying that it is hard to make then I think we can live with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants