jaing / react-native-places-input

MIT License
46 stars 18 forks source link

Can't click on search results on Android #2

Closed edonadei closed 4 years ago

edonadei commented 4 years ago

Hello, just wanted to warn you with an issue on Android emulator (Google Pixel 3), we can't click on the searchables results, so it won't trigger the onSelect.

My exemple on Expo:

import React from "react";
import PlacesInput from "react-native-places-input";

export default function NewTerminal() {
  return (
      <PlacesInput
        googleApiKey={"MY_API_KEY"}
        onSelect={place => console.log(place)}
      />
  );
}

Screen of what happens

jaing commented 4 years ago

Fixed in 1.0.7. Issue was with Android not able to trigger on press in scroll view with opened keyboard and absolute position.

edonadei commented 4 years ago

Hello again, it looks like the exact same issue is still on with the 1.0.8 version of your package,

Here is now a video of what happens

jaing commented 4 years ago

Hm - you sure mate? I tested both android and iphone:

https://drive.google.com/open?id=1WjEsQya07xjZEfsRGjffbAXOrShjd4jP

and its working fine. Can you provide more details about your case?

egecavusoglu commented 4 years ago

I am having a similar issue with absolute positioning on react-native-maps.The map collects the touch events rather than the list.

shawnmitchell commented 4 years ago

I've got the same Android issue with 1.1.2. Can't interact with the results list.

jaing commented 4 years ago

Is the map in a scroll view?

shawnmitchell commented 4 years ago

The list is in an but not a scroll view and in fact there is no map, just a straight address lookup for a bottom sheet form.

On Thu, Apr 23, 2020 at 4:54 AM Kamil Thomas notifications@github.com wrote:

Is the map in a scroll view?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jaing/react-native-places-input/issues/2#issuecomment-618272946, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3NS5PQVP7ULHGKECFRG7DRN7645ANCNFSM4LDPYVWA .

jaing commented 4 years ago

Can you give me your full example with styles included?

shawnmitchell commented 4 years ago

Okay, I looked into this a bit more. I was doing some zIndex stuff with my bottom sheet that was confusing the dropdown list. I set up a clean test view with just

<View>
    <PlacesInput
       ...
    />
    <Button
      ...
    />
</View>

and found that while the dropdown list worked fine in iOS, when I tried to select the first item in the list on Android, the button behind the list was being triggered. I added stylesContainer={{shadowOpacity: 0, zIndex: 2}} to PlacesInput and the top item in the list became selectable. Hopefully this is helpful.

alindao-charles commented 4 years ago

Hi, how can I set the placeInput's text value accordingly, because there's no value property and I want to set it programmatically. Thank you!

NVM: I got it working thanks

jaing commented 4 years ago

I added new prop: query that will set an initial text input value