Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
google-places-suggester
Advanced tools
You can use the google places auto complete feature by passing your google api key as prop.
Readme
npm install google-places-suggester
A React component to build a customized UI for Google Maps Places Autocomplete
To install the stable version
npm install --save google-places-suggester
React component is exported as a default export
import AddressAutoComplete from "google-places-suggester";
utility functions are named exports
Create your component
import React from "react";
import PlacesAutocomplete from "google-places-suggester";
<AddressAutoComplete
google_api_key={"YOUR_API_KEY"}
allowedCountries={["Array of allowed country codes"]}
seperatedAddress={true | false}
/>;
Prop | Type | Required | Description |
---|---|---|---|
google_api_key | string | :white_check_mark: | The Google API key to be used to show suggestions. |
allowedCountries | string[] | An array of country codes to allow. Use an empty array to allow all countries. | |
separatedAddress | boolean | If true , the address will be returned as an object containing address, postalCode, city, country, and state separately. If false , it will only return an object with the address. | |
onChange | function | :white_check_mark: | Callback function to handle input changes. |
label | string | Label for the input field. | |
className | string | CSS class name for styling. | |
styles | Object | CSS styles for customization. | |
onFocus | function | Callback function when the input field is focused. | |
onBlur | function | Callback function when the input field loses focus. | |
defaultValue | string | Default input value. | |
value | string | Input value. | |
ref | Object | Reference object for accessing the input element. | |
disabled | boolean | If true , the input is disabled. | |
onPaste | function | Callback function for handling paste events. | |
required | boolean | If true , the input is required. |
<AddressAutoComplete
google_api_key={"YOUR_API_KEY"}
allowedCountries={["Array of allowed country codes"]}
seperatedAddress={true | false}
onChange={(value) => this.setState({ value })}
/>
FAQs
You can use the google places auto complete feature by passing your google api key as prop.
The npm package google-places-suggester receives a total of 1 weekly downloads. As such, google-places-suggester popularity was classified as not popular.
We found that google-places-suggester demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.