Fixed multiple parent .. folders that could appear when multiple file listings are done during infinite scroll. Also fixes a bug where infinite scroll was not working as intended and subsequent requests after the first one were not being made
Added a condition where the .. backPath folder is only added in the first load when the offset is 0
Made a change so that the .. backPath is added to the filesList array instead of the files array from the api response. Originally, the change in length from the added backPath entry was causing the offset to be 1 larger than expected which broke the infinite scroll functionality
Testing Steps:
Start the application and open the file browser modal by selecting Import Images from DesignSafe in the menu
Select a system with lots of files/folders (Published Data has hundreds)
Scroll the listing and ensure that the listing works smoothly and there are no duplicate .. folders. Can also monitor the Network tab to ensure new data with updated offset is being fetched
Repeat the above steps with the download selector modal which can be opened by selected Export to DesignSafe menu option
Overview:
Fixed multiple parent
..
folders that could appear when multiple file listings are done during infinite scroll. Also fixes a bug where infinite scroll was not working as intended and subsequent requests after the first one were not being madeRelated Jira tickets:
Summary of Changes:
..
backPath folder is only added in the first load when the offset is 0..
backPath is added to thefilesList
array instead of thefiles
array from the api response. Originally, the change in length from the added backPath entry was causing the offset to be 1 larger than expected which broke the infinite scroll functionalityTesting Steps:
Import Images from DesignSafe
in the menuPublished Data
has hundreds)..
folders. Can also monitor the Network tab to ensure new data with updated offset is being fetchedExport to DesignSafe
menu optionUI Photos:
No UI changes
Notes: