Reset to page 1 if the current project or element changes
Closes #798 (closed)
Here is what actually happens in the frontend:
- The user opens a parent element
- The frontend loads the element and saves it in the store
- The element is detected as a folder, so
ElementList
is mounted to browse its children
- The user opens a child element
- There is no current element since it is not in the store yet;
ElementList
is unmounted since we do not know whether it's a folder - The frontend loads the element and saves it in the store
- The element is detected as a folder, so
ElementList
is mounted to browse its children
- There is no current element since it is not in the store yet;
- The user goes back to the parent element
- The parent element is not reloaded at all
-
ElementList
is kept, because this element is already known as a folder so a computed property does not change at all - The watchers on
ElementList
detect the element ID change, but the page is not reset to 1, so it keeps the existing page.
Edited by Erwan Rouchet