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

Description list stays open after attempting to type in a different text input #566

Closed
3 of 4 tasks
plaporte opened this issue May 20, 2020 · 3 comments · Fixed by #398
Closed
3 of 4 tasks

Description list stays open after attempting to type in a different text input #566

plaporte opened this issue May 20, 2020 · 3 comments · Fixed by #398
Labels

Comments

@plaporte
Copy link

After selecting an item in from the google places description list, it will close, however when moving to the next textInput and typing, the description list opens back up. Here's a gif:

ezgif com-resize

Expected behavior

I expect it to close until I tap back into the google places text input.

Code Example (required - issue will be closed without this)

My Code:

<GooglePlacesAutocomplete
                    placeholder="Search location"
                    // fetchDetails={true}
                    onPress={(data, details = null) => {
                      setFieldValue("location", data.description);
                    }}
                    query={{
                      key: GOOGLE_SEARCH_API,
                      language: "en",
                    }}
                    autoCapitalize={false}
                    autoCorrect={false}
                    placeholderTextColor={Global.accentColor2}
                    styles={googleSearchBox}
                    autoFocus={false}
           />
  const googleSearchBox = {
    container: {
      backgroundColor: Global.mainBackgroundColor,
      marginHorizontal: 0,
      padding: 0,
      marginVertical: 10,
      border: 0,
      borderRadius: 15,
    },
    description: {
      color: Global.mainFontColor,
      fontSize: 16,
      paddingright: 10,
    },
    textInputContainer: {
      borderBottomWidth: 3,
      paddingLeft: 10,
      borderBottomColor: Global.mainColor,
      fontSize: 18,
      backgroundColor: Global.accentColor1,
      marginLeft: 0,
      color: Global.mainFontColor,
      borderTopWidth: 0,
      borderRadius: 15,
    },
    textInput: {
      fontSize: 18,
      backgroundColor: "transparent",
      color: Global.mainFontColor,
      padding: 0,
      paddingBottom: 10,
      marginLeft: 0,
    },
    predefinedPlacesDescription: {
      // color: Global.mainColor,
    },
    powered: {
      display: "none",
      backgroundColor: "transparent",
    },
    poweredContainer: {
      display: "none",
      backgroundColor: "transparent",
    },
  };

Screenshots

GIF Above

Where is this bug happening

  • iOS
  • Android
  • Web

If you are using expo please indicate here:

  • I am using expo

Version Information (please complete the following information)

@plaporte plaporte added the bug label May 20, 2020
@bell-steven
Copy link
Collaborator

bell-steven commented May 20, 2020

Thanks for reporting this. Would you mind provided a full code reproduction of the issue? In the meantime, the listViewDiplayed prop might help you out here.

@bell-steven
Copy link
Collaborator

I was able to reproduce this. There is actually a PR open already that should solve this. #398

@bell-steven bell-steven linked a pull request May 20, 2020 that will close this issue
@bell-steven
Copy link
Collaborator

Fixed in v1.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants