1.0.3 • Published 8 years ago

googlePlaceAutocomplete v1.0.3

Weekly downloads
13
License
-
Repository
github
Last release
8 years ago

GooglePlaceAutocomplete component for ReactJS

Wrapper on top of the material-ui AutoComplete component that use google place api

Installation

Add this script to your html page:

<head>
  <script src="https://maps.googleapis.com/maps/api/js?libraries=places"></script>
</head>

Material-ui is required:

  npm install material-ui
  npm install googlePlaceAutocomplete

Features

  • AutoComplete that auto-load google places

Getting started

<GooglePlaceAutocomplete searchText={'paris'}
                         onChange={onAutoCompleteInputChangeFct}
                         onNewRequest={onClickLocationFct}
                         name={'location'}
/>

Props:

Development

  • npm run build - produces production version
  • npm run dev - produces development version
  • npm test - run the tests