You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add a submit button beside the geosuggest input to help add functional options for the user. The geosuggest component uses the autoActivateFirstSuggest to always offer a result to the user rather than an error state. When using .selectSuggest() it's searching for exactly what the user typed - and even when typing in a full city (IE Vancouver, BC, Canada) it returns an INVALID_REQUEST
Expected results
I expected that when the geosuggest component has the autoActivateFirstSuggest prop that .selectSuggest() uses it.
Actual results
Instead of .selectSuggest() honouring autoActivateFirstSuggest, I saw that it searches for what's exactly inputted into the input field and returns INVALID_REQUEST
Additional Information
Using version 2.10.0
Here's how my markup looks:
<Geosuggest
ref={(input) => { this.geoSuggest = input }}
placeholder="Enter address, city, or postal code"
onSuggestSelect={this.updateAddress}
onChange={this.handleAddressChange}
country="ca"
autoActivateFirstSuggest
/>
<button className="search-submit" onClick={() => this.geoSuggest.selectSuggest()}>Go</button>
Response from the network call when hitting the button:
One other thing to note, when I remove autoActivateFirstSuggest as a prop, clicking enter on the input field results in the same network response, which is why I'm assuming this is related to there being no results.
If there's another reason why it's responding with INVALID_REQUEST, I couldn't find any documentation around it, so I'd love to be pointed in the direction of more information!
The text was updated successfully, but these errors were encountered:
Short description
I'm trying to add a submit button beside the geosuggest input to help add functional options for the user. The geosuggest component uses the
autoActivateFirstSuggest
to always offer a result to the user rather than an error state. When using.selectSuggest()
it's searching for exactly what the user typed - and even when typing in a full city (IE Vancouver, BC, Canada) it returns anINVALID_REQUEST
Expected results
I expected that when the geosuggest component has the
autoActivateFirstSuggest
prop that.selectSuggest()
uses it.Actual results
Instead of
.selectSuggest()
honouringautoActivateFirstSuggest
, I saw that it searches for what's exactly inputted into the input field and returnsINVALID_REQUEST
Additional Information
Using version 2.10.0
Here's how my markup looks:
Response from the network call when hitting the button:
Request URL for ref: https://maps.googleapis.com/maps/api/place/js/PlaceService.GetPlaceDetails?2sen-US&8sVancouver%2C%20BC%2C%20Canada&10e3&15s3CBA685F-FB46-4D38-BA6A-982D434DE6A5ab1qrfk3rz4d&17m1&2e1&callback=_xdc_._o7v3hz&key={GOOGLE-API-KEY}&token=95578
One other thing to note, when I remove
autoActivateFirstSuggest
as a prop, clicking enter on the input field results in the same network response, which is why I'm assuming this is related to there being no results.If there's another reason why it's responding with INVALID_REQUEST, I couldn't find any documentation around it, so I'd love to be pointed in the direction of more information!
The text was updated successfully, but these errors were encountered: