Skip to content
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

Merged
merged 3 commits into from
May 18, 2022
Merged

Conversation

mjmayank
Copy link
Collaborator

No description provided.

@@ -59,40 +58,30 @@ const AutocompleteModal: FunctionComponent<ModalWFinalFormProps> = ({
const response = await handleTypeAhead(queryString);
if (response.data) {
setSuggestions(response.data);
setLoading(false);
Copy link
Collaborator

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.

Copy link
Collaborator Author

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

@@ -60,7 +60,6 @@ const AutocompleteModal: FunctionComponent<ModalWFinalFormProps> = ({
if (response.data) {
setSuggestions(response.data);
setLoading(false);
Keyboard.dismiss();
Copy link
Collaborator Author

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}
Copy link
Collaborator Author

@mjmayank mjmayank May 18, 2022

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

@mjmayank mjmayank merged commit 2298bbd into main May 18, 2022
@mjmayank mjmayank deleted the more-small-fixes branch May 18, 2022 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants