LPD-50672 Support multiple selection with pagination in SearchContainer modal #4781
+40
−9
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.
Issue: https://liferay.atlassian.net/browse/LPD-50672
LPP: https://liferay.atlassian.net/browse/LPP-57520
Support multiple selection with pagination in SearchContainer modal
The goal of this PR is to support multiple selection within pagination in SearchContainer modal.
The initial problem was that the SearchContainer removes objects from the DOM when navigating through pages, leaving only nodes with the "value" attribute, but losing the reference to the dataset of the parent node of the list. This made it impossible for the Commerce module to support multiple selection of roles across more than one page.
The solution was to make the SearchContainer include the required information when changing pages. In addition, the elements that consumed that information had to be adapted to give them the intelligence to know if they had to obtain the information they needed from the parent element, or from the element created by pagination itself.
role_item_selector.jsp