This package has been deprecated

Author message:

Please use material-ui-places

googlePlaceAutocomplete

1.0.3 • Public • Published

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:

  • Same as AutoComplete material-ui component (http://www.material-ui.com/#/components/auto-complete)

  • onNewRequest: function -> (selectedData, searchedText, selectedDataIndex)

Development

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

Package Sidebar

Install

npm i googlePlaceAutocomplete

Weekly Downloads

2

Version

1.0.3

License

none

Last publish

Collaborators

  • ydeshayes