Select Input control for MarkoJS
npm install marko-selectSelect Input control for MarkoJS
```
npm install marko-select
or
``
yarn add marko-select
Then use it in your app:
`marko
inputClass="form-control"
menuClass="animated faster slideInDown"
name="country"
value=state.selectedCountry
placeholder="Select Country"
searchable=true
options=[
{ label: "United State", value: "US" },
{ label: "France", value: "FR" }
]
on-change("onHandlerChange")
on-menu-open( () => console.log('menu-open') )
on-menu-close( () => console.log('menu-close') )/>
`
Common props you may want to specify include:
- class - apply a class to the control containerinputClass
- - apply a class to the control inputmenuClass
- - apply a class to the control options menudisabled
- - disable the controlautoFocus
- - focus the control when it mountssearchable
- - allow the user to search for matching optionsname
- - generate an HTML input with this name, containing the current valueoptions
- - specify the options the user can select fromplaceholder
- - change the text displayed when no option is selectedvalue
- - control the current value
- on-change - subscribe to select change eventson-menu-open
- - subscribe to menu open eventson-menu-close` - subscribe to menu close events
-
Feedback & Contribution
-------
You know the say: No one is whole alone! So, feedbacks are all welcome. Kindly report any encounted [Issues here][] and I'll be glad to work on it right away. Thank you.
License
-------
This software is free to use under the MIT license. See the [LICENSE file][] for license text and copyright information.
[LICENSE file]: https://github.com/fabrice8/marko-select/blob/master/LICENSE
[Issues here]: https://github.com/fabrice8/marko-select/issues