Removing one value from Search filter clears the search#55636
Removing one value from Search filter clears the search#55636luacmartins merged 6 commits intoExpensify:mainfrom
Conversation
550ec50 to
cc44229
Compare
| }} | ||
| isFullWidth | ||
| onSubmit={() => { | ||
| if (!isAutocompleteListVisible) { |
There was a problem hiding this comment.
I have used this logic instead of below logic, because in case when we select the currency or category from the suggestions and we press enter submitSearch() does not work. So now if the dropdown is not visible we assume submitSearch() is already called otherwise we call submitSearch().
onSubmit={() => {
const focusedOption = listRef.current?.getFocusedOption();
if (!focusedOption) {
submitSearch(textInputValue);
}
}}
There was a problem hiding this comment.
The behaviour you are seeing is consist with the on mouse click. Thus it's not really a bug. Please revert and use the agreed on solution.
|
@s77rt please prioritize this one when you're online since it's affecting a lot of users |
| listRef.current?.updateAndScrollToFocusedIndex(0); | ||
| } else { | ||
| listRef.current?.updateAndScrollToFocusedIndex(-1); | ||
| } |
There was a problem hiding this comment.
Revert. This should be:
if (updatedUserQuery) {
listRef.current?.updateAndScrollToFocusedIndex(0);
} else {
listRef.current?.updateAndScrollToFocusedIndex(-1);
}There was a problem hiding this comment.
Sorry I misunderstood your suggestion, reverted. Thank you!
| onSearchQueryChange={(userQuery) => { | ||
| onSearchQueryChange(userQuery); | ||
| if (userQuery) { | ||
| return; | ||
| } | ||
| listRef.current?.updateAndScrollToFocusedIndex(-1); | ||
| }} |
There was a problem hiding this comment.
Sorry I misunderstood your suggestion, reverted. Thank you!
| }} | ||
| isFullWidth | ||
| onSubmit={() => { | ||
| if (!isAutocompleteListVisible) { |
There was a problem hiding this comment.
The behaviour you are seeing is consist with the on mouse click. Thus it's not really a bug. Please revert and use the agreed on solution.
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.movdesktop.2.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.89-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.89-8 🚀
|
Explanation of Change
Fixed Issues
$ #55433
PROPOSAL: #55433 (comment)
Tests
Same as QA
Offline tests
NA
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Scenario 1:
Scenario 2:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android.mp4
Android: mWeb Chrome
Android.web.mov
iOS: Native
IOS.mp4
iOS: mWeb Safari
IOS.Web.mp4
MacOS: Chrome / Safari
Web.mov
MacOS: Desktop
Desktop.mov