-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing one value from Search filter clears the search #55636
Removing one value from Search filter clears the search #55636
Conversation
550ec50
to
cc44229
Compare
isFullWidth | ||
onSubmit={() => { | ||
if (!isAutocompleteListVisible) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, reverted
@s77rt please prioritize this one when you're online since it's affecting a lot of users |
@@ -126,8 +126,6 @@ function SearchPageHeaderInput({queryJSON, children}: SearchPageHeaderInputProps | |||
|
|||
if (updatedUserQuery || textInputValue.length > 0) { | |||
listRef.current?.updateAndScrollToFocusedIndex(0); | |||
} else { | |||
listRef.current?.updateAndScrollToFocusedIndex(-1); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert. This should be:
if (updatedUserQuery) {
listRef.current?.updateAndScrollToFocusedIndex(0);
} else {
listRef.current?.updateAndScrollToFocusedIndex(-1);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I misunderstood your suggestion, reverted. Thank you!
isFullWidth | ||
onSubmit={() => { | ||
if (!isAutocompleteListVisible) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
✋ 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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