Fix Magic Select binding for Editions DataTable #9888
+52
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #9853 Task 5
Fix
Technical
Initializes the ILE/SelectionManager classes before the Editions DataTable to allow the ILE to bind the click events and add class names to the relevant DOM elements.
Prevents the Editions DataTable from re-initialization with .isDataTable method.
Utilizes the
drawCallback
option for DataTables to remove visual inconsistencies when a user selects editions from multiple pages, clicks on clear selection, and re-navigates to a page that had a previously selected edition by checking the sessionStorage object.Testing
Sign in with the admin account and navigate to a work that has >3 editions (the more the better).
Verify that the magic select editions beyond the first page of the Editions Table.
Press the
Clear Selection
button within the magic select toolbar on the bottom of the page.Navigate back to the pages where the editions were previously selected. The magic select classes and styling should not be present anymore.
Screenshot
2024-09-18.12-05-56.mp4
Stakeholders
@cdrini