searchable multiple select react component
npm install --save search-multiple-select
import React, { Component } from 'react'
import MultipleSelect from 'search-multiple-select'
import 'search-multiple-select/dist/index.css'
class Example extends Component {
// the callback. Use a better name
const getOptionsData = (data) => {
console.log(data); // print option data - to test
};
render() {
return <MultipleSelect options={['']} getOptionsData={getOptionsData}/>
}
}
Property | Type | Default | Description |
---|---|---|---|
options |
Array | [''] | Array of string - Options to show |
getOptionsData |
Function | () => {} | return option data |
MIT © Nazeh-Taha