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

fix(files): Ensure renaming state is correctly reset #48425

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Sep 27, 2024

Summary

Problem: Is a node is renamed and the new name is out of the current visible list of nodes the component will be recycled, this means the props will change, so when the onRename functions is about to reset the state the this.source will point to a different node.

To fix this, but also to separate business logic from visual representation, the logic is moved into the renaming store and the component is only responsible for rendering.

Checklist

@susnux
Copy link
Contributor Author

susnux commented Sep 27, 2024

/backport to stable30

@susnux susnux marked this pull request as ready for review October 7, 2024 10:56
@susnux susnux requested a review from skjnldsv as a code owner October 7, 2024 10:56
@susnux susnux requested review from a team, artonge, sorbaugh and Pytal and removed request for a team October 7, 2024 10:57
Problem: Is a node is renamed and the new name is out of the current
visible list of nodes the component will be recycled, this means
the props will change, so when the `onRename` functions is about to reset
the state the `this.source` will point to a different node.

To fix this, but also to separate business logic from visual representation,
the logic is moved into the renaming store and the component is only
responsible for rendering.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
Copy link
Contributor Author

susnux commented Oct 8, 2024

/compile

@susnux susnux enabled auto-merge October 8, 2024 16:42
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renamed nodes that are out of viewport keep renaming state
4 participants