[4.0] Fix Module Positions Filter #33856
Merged
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.
Pull Request for Issue # .
Summary of Changes
See #33763 (comment) to understand the issue which this PR tries to solve. Basically, on Modules management screen, if you filter module by certain position which only has one module and you:
After doing the action, you will be redirected back to Modules management screen with no modules displayed and also, no position selected in the filter. You would think that it is confusing because you do not have anything in the filter, why there are no modules at all?
This PR just tries to fix that special case by make sure the selected/remember position will be available and selected in the dropdown so that you know the reason why there is no modules being displayed.
Testing Instructions
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Additional Comments
I'm unsure if it is really needed. But since it is reported and I see that the UI is confusing for this case, so I make a PR to address it anyway. I have no problem if this PR is rejected :)