]> source.dussan.org Git - nextcloud-server.git/commit
fix(files): Ensure renaming state is correctly reset
authorFerdinand Thiessen <opensource@fthiessen.de>
Thu, 22 Aug 2024 19:49:06 +0000 (21:49 +0200)
committerFerdinand Thiessen <opensource@fthiessen.de>
Tue, 15 Oct 2024 16:20:16 +0000 (18:20 +0200)
commitef5a9cf00d0842e8e359ddf99a3f492421f09220
treea238354977ee2da1ad9d7c9e2ad6d93fa8280d51
parentcd3dc1719b8e84526f2c99634f0dc8bf16380579
fix(files): Ensure renaming state is correctly reset

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>
apps/files/src/components/FileEntry/FileEntryName.vue
apps/files/src/store/renaming.ts
cypress/e2e/files/files-renaming.cy.ts