react-advanced-select
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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"
        />
    }
}
 

Preview

Live Preview

Package Sidebar

Install

npm i react-advanced-select

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

5.56 kB

Total Files

11

Last publish

Collaborators

  • gebeto