-
Notifications
You must be signed in to change notification settings - Fork 3
ComboSearch
andy.rothwell edited this page Oct 8, 2019
·
4 revisions
A phila-vue-comps ComboSearch is an input that allows you to submit different inputs to different app functions.
This is how a ComboSearch component is placed in an application:
<combo-search
:dropdown="dropdownData"
:search-string="searchString"
:dropdown-selected="dropdownSelected"
@trigger-combo-search="comboSearchTriggered"
@trigger-clear-search="clearSearchTriggered"
@trigger-search-category-change="comboSearchCategoryChange"
/>
The example above uses variables for "dropdownData", "searchString", and "dropdownSelected". Those variables can be defined in the "data" of the vue component that includes the ComboSearch.
data() {
return {
dropdownData: {
address: {
text: 'Address',
data: null,
},
keyword: {
text: 'Keyword',
data: null,
},
},
searchString: '',
dropdownSelected: '',
}
}
|event|definition| |---|---|---| |trigger-combo-search|submits the current typed-out value| |trigger-clear-search|clears the current typed-out value| |trigger-search-category-change|changes the category|