Skip to content

Reset to page 1 if the current project or element changes

Erwan Rouchet requested to merge reset-page-number into master

Closes #798 (closed)

Here is what actually happens in the frontend:

  1. The user opens a parent element
    1. The frontend loads the element and saves it in the store
    2. The element is detected as a folder, so ElementList is mounted to browse its children
  2. The user opens a child element
    1. 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
    2. The frontend loads the element and saves it in the store
    3. The element is detected as a folder, so ElementList is mounted to browse its children
  3. The user goes back to the parent element
    1. The parent element is not reloaded at all
    2. ElementList is kept, because this element is already known as a folder so a computed property does not change at all
    3. 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

Merge request reports

Loading