marko-select
v0.0.4
Published
Select Input control for MarkoJS
Downloads
1
Readme
marko-select
Select Input control for MarkoJS
Installation
npm install marko-select
or
yarn add marko-select
Then use it in your app:
Usage
<Select class="my-select-input"
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') )/>
Inputs Properties
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
Events
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.