1.0.8 • Published 6 years ago

react-thai-address-autocomplete v1.0.8

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

react-thai-address-autocomplete

npm.io

install

$ npm install -S react-thai-address-autocomplete

usage

import ThaiAddressAutoComplete, {
	Address,
} from './ThaiAddressAutoComplete';

const address: Address = {
	'city': '',
	'province': '',
	'tumbon': '',
	'zipcode': '',
};

<ThaiAddressAutoComplete
	address={address}
	handleSelect={(address: Address) => {
		console.log(address);
	}}
	renderItems={(item: Address, index: number) => {
		return (
			<p>
				{JSON.stringify(item)}
			</p>
		);
	}}
/>

types

  • Address
{
	'city': 'city', // string;
	'province': 'province', // string;
	'tumbon': 'tumbon', // string;
	'zipcode': 10001, // string | number
}

props

address

type:

Address

handleSelect

type:

(address: Address) => void

renderItems

type:

(item: Address, index: number) => JSX.Element
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago