-
Notifications
You must be signed in to change notification settings - Fork 0
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
Some UI fixes to search autocomplete modal #12
Conversation
cc5278f
to
c6985a5
Compare
@@ -59,40 +58,30 @@ const AutocompleteModal: FunctionComponent<ModalWFinalFormProps> = ({ | |||
const response = await handleTypeAhead(queryString); | |||
if (response.data) { | |||
setSuggestions(response.data); | |||
setLoading(false); |
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 loading indicator is. meant to depict network activity because the locations are fetched over a network, and can be delayed sometimes.
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.
yeah, i think i prefer it without the indicator though. i checked some other apps and they don't have it either, they just update the results
5d65c9b
to
6eea9e0
Compare
6eea9e0
to
f3f0b3a
Compare
@@ -60,7 +60,6 @@ const AutocompleteModal: FunctionComponent<ModalWFinalFormProps> = ({ | |||
if (response.data) { | |||
setSuggestions(response.data); | |||
setLoading(false); | |||
Keyboard.dismiss(); |
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.
this was causing the keyboard to be dismissed as the user is typing
renderItem={_renderItem} | ||
data={suggestions} | ||
keyboardShouldPersistTaps="always" | ||
showsVerticalScrollIndicator={false} |
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.
this works, but i prefer the CSS fix below of adjusting the padding and margin onto the correct elements
No description provided.