react-selectlist

React component used for selecting multiple values or single statess from several options.

Install

npm i --save react-selectlist
Sh

props

import ReactSelectList from "react-selectlist";
<ReactSelectList
  data={data}
  disabled={[true, true]}
  value={selected}
  multiple={multiple}
  orientation={orientation}
  onChange={this._onSelectChange}
/>;
Js

data

data:[
  { value: 1, label: 'Nuggets'},
  { value: 2, label: 'Jazz'},
  { value: 3, label: 'Warriors' },
  { value: 4, label: 'Lakers' },
]

or

data:[0,1,2,3,4]
Sh

value

array: [1,2,3]
Sh

valueField & textField

string: default value & label
Sh

multiple

type boolean: true|false
Sh

orientation

string :horizontal|vertical
Sh

onChange

call back function
The select value return in string array
return (["0","1"],id)
Sh

License

MIT
Sh

GitHub

React component used for selecting multiple values or single states from several optionsRead More

Latest commit to the master branch on 1-4-2023
Download as zip