react-advanced-select
v1.0.3
Published
React.js advanced select
Downloads
8
Maintainers
Readme
react-advanced-select
Installation
Using NPM for use with TypeScript/JavaScript
$ npm install react-advanced-select
Using
const someCode = null;
import React, { Component } from 'react';
import AdvancedSelect from 'react-advanced-select';
const elements = [{
post_code: 10001,
short: "ny",
title: "New York",
}, {
post_code: 22434,
short: "sd",
title: "San Diego",
}];
export class MySelectBlock extends Component {
render() {
<AdvancedSelect
data={elements}
onChange={(item) => {
console.log(item); // output: { post_code: ..., title: ..., short: ... };
}}
label="Cities"
/>
}
}