react-places-autocomplete icon indicating copy to clipboard operation
react-places-autocomplete copied to clipboard

Bug: 'strictBounds' does not exist in type

Open dangnelson opened this issue 4 years ago • 1 comments

Using version 7.3.0, when trying to set 'strictBounds' while using Typescript results in the following error:

"'strictBounds' does not exist in type "

Example usage:

      <PlacesAutocomplete
        value={address}
        onChange={handleChange}
        onSelect={handleSelect}
        searchOptions={{ bounds: getStateBounds("ca"), strictBounds: "true" }}
      >

According to the Google Places API: "strictBounds is a boolean specifying whether the API must return only those places that are strictly within the region defined by the given bounds. The API does not return results outside this region even if they match the user input."

dangnelson avatar Jan 22 '21 17:01 dangnelson

Actually it looks like several of the search options have changed based on the documentation I'm reading now.

dangnelson avatar Jan 22 '21 21:01 dangnelson