Skip to content

fix(catalogue): clear the selected papers when the subject changes - #580

Open
Dx-Alz-xD wants to merge 1 commit into
CodeChefVIT:stagingfrom
Dx-Alz-xD:krish/reset-selection-per-subject
Open

Dx-Alz-xD wants to merge 1 commit into
CodeChefVIT:stagingfrom
Dx-Alz-xD:krish/reset-selection-per-subject

Conversation

@Dx-Alz-xD

Copy link
Copy Markdown
Contributor

fixes #577

moving to another subject inside the catalogue (for example through a related subject) only changes the ?subject= query, so the page and FilterProvider stay mounted and the papers picked on the last subject stayed selected. the count showed them, select all could read as already done, and download selected zipped them under the new subject's name.

FilterProvider already gets subject, so it now clears selectedPapers whenever the subject changes.

tested on a local dev server with two subjects: picked 2 of 3 papers on one, switched through the related subject link and the count was 0 / 3 (it was 2 / 3 before), picking 1 there showed 1 / 3 and download (1), and going back showed 0 / 3. tsc --noEmit and eslint pass.

moving to another subject from the catalogue, for example through a
related subject, keeps the page and its filter context mounted, so the
papers picked on the last subject stayed selected. the count showed them,
select all could read as already done, and download selected zipped them
under the new subject's name. the selection now resets whenever the
subject changes

fixes CodeChefVIT#577

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Selected Paper Count Persists When Navigating Between Subjects

1 participant