This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
MM-19195 - Clear search results before opening RHS for mobile view #4031
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.
Summary
When the screen is small enough the search bar in the channel header turns into a button that when clicked opens the RHS and the user can type the search terms there.
In this case, it was not cleaning out any previous results or search terms causing issues as the attached one.
To fix these, I've included a new RHS action
openRHSSearch
that will clear out any current results and search terms before opening the RHS for the search button in the channel header in both smaller screen and mobile view cases.Mobile View Search Button:
Smaller Screen Search Button:
This was not a problem when the search has the input bar to type given that the RHS would only open when the search has been performed and will replace any old results from previous search actions.
Ticket Link
Fixes MM-19195