<ui-dropdown
type="search selection"
label="Gender"
options="selectOptions"></ui-dropdown>
new Vue({
data: {
selectOptions: [
{ text: 'Male', value: 'male' },
{ text: 'Female', value: 'female'}
]
}
})
A dropdown instance has the following methods
Change the type of the Dropdown the same way you would normally do it in Semantic-UI by using class names
'type' is simply a list of classes which are appended to the dropdown
<ui-dropdown label="Gender" options="selectOptions"></ui-dropdown>
<ui-dropdown type="selection" label="Gender" options="selectOptions"></ui-dropdown>
<ui-dropdown type="search selection" label="Gender" options="selectOptions"></ui-dropdown>
<span> The gender of this user is
<ui-dropdown type="inline" label="Gender" options="selectOptions"></ui-dropdown>
</span>
A label which appears on the dropdown when no option is selected
Event used to trigger dropdown 'hover' or 'click'
options should be a keypath/expression in the parent view model that points to an Array to use as the dropdown options
sets the name of the <input /> inside the dropdown
Here is the Jade template of this component. The content blocks can be replaced using a selector. Important: Make sure you include all the Vue.js directives as in the original template for the Component to work.