Relect
A Tiny React Single Select Component.
Example
Install
npm i relect -S
Usage
;;// include styles;const options =text: 'one' value: 1text: 'two' value: 2;Component{superprops;thisstate = chosen : null}{this;}{return<Relect options=optionschosen=thisstatechosenonChange=thisonChange/>}
Props
Property | Type | Default | Description |
---|---|---|---|
width | number | 240 | width of select |
height | number | 36 | height of select |
options | array | / | options |
chosen | number | / | index of chosen option |
tabIndex | number | -1 | tab order |
disabled | bool | false | whether to disable select |
autoBlur | bool | false | auto blur after selection |
placeholder | string | / | placeholder text |
optionHeight | number | 30 | height of option |