React-native-google-places-autocomplete: Current Location Suggestions: Each child in an array or iterator should have a unique "key" prop.

Created on 8 Sep 2017  路  4Comments  路  Source: FaridSafi/react-native-google-places-autocomplete

So I upgraded From 1.2.6 into 1.3.2 and now when I go to a screen that has GooglePlacesAutocomplete Component, and I click on Current Location to see nearby locations, it pops a warning saying the each child of the FlatList should have a unique key.

Code:

<GooglePlacesAutocomplete
    placeholder="Search"
    minLength={4}
    autoFocus={false}
    fetchDetails={true}
    onPress={this.handleUpdateLocation.bind(this)}
    query={{
        key: GOOGLE_PLACES_API_KEY,
        language: 'en', // language of the results
    }}

    // home & work values are hard coded above (top of the file)  
    currentLocation={true} 
    currentLocationLabel="Current Location"
    predefinedPlaces={[HOME_LOCATION, WORK_LOCATION]} // will add two predefined (hard coded) locations, home & work.
/>

Behavior:
1

Warning:

simulator screen shot sep 8 2017 11 10 31 am

Most helpful comment

Please use version 1.3.4

All 4 comments

Fixed by #192. I will release a new version soon :D
Thank you for your message.

@guilhermepontes HI and thanks,

when are you planning to release? As it looksl ike most of the results are being whipped out. In my above GIF, the final results are pretty far away locations from my current location. And if we look closely on the GIF, it seems like it loads ALL results, but then removes some and pops the warning.

Please and thanks again

I just released it, @KhalilKhalaf.

Please use version 1.3.4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tgreco picture tgreco  路  3Comments

nikohosn picture nikohosn  路  3Comments

miguel-pm picture miguel-pm  路  3Comments

biks152207 picture biks152207  路  4Comments

tezahzulueta picture tezahzulueta  路  3Comments