Socket
Socket
Sign inDemoInstall

react-native-autocomplete-france-address

Package Overview
Dependencies
516
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-autocomplete-france-address

React Native module to search places using Data.Gouv API in France


Version published
Maintainers
1
Created

Readme

Source

react-native-autocomplete-france-address

Module for React Native & Expo that helps you to create an address autocompletion based on Data.gouv


License: MIT Donate


Demo

Installation

NPM

npm install react-native-autocomplete-france-address --save

Yarn

yard add react-native-autocomplete-france-address

Expo

expo install react-native-autocomplete-france-address --save

Usage

Basic

import AutocompleteAddress from 'react-native-autocomplete-france-address'

render() {
    return <AutocompleteAddress isOpen={this.state.modalAddress} 
                                onFindAddress={(address) => {
                                    console.log(address)
                                }} 
                                onCloseModal={() => this.setState({modalAddress: false})} 
                                placeholder={"Cherchez une adresse, un lieu..."}/>
}

Properties

Required

  • onFindAddress(address): Function that return address from API when user click on entry.
  • onCloseModal(): Function called when the modal need to be closed.
  • isOpen: Boolean that determinate if the modal for searching address is open or not.
  • placeholder: String.

Optional

  • onSearchError(error): Function that return an error if there is an error during the search.
  • containerStyle: Object for the container style.
  • inputStyle: Object for the input style.
  • addressStyle: Object for the suggested rows address text.
  • cityStyle: Object for the suggested rows cities text.
  • inputWidth: Number width of the input.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Keywords

FAQs

Last updated on 05 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc