在高级搜索框中,我能够在下拉列表中显示值列表,如下例所示,它仅包含值列表,但现在我想在高级搜索框中使用下拉列表处理键值对。
下拉列表中的唯一值列表示例:
"key1": {
"name": "name",
"key": "key1",
"placeholder": "some text...",
"type": "text",
"restrictToSuggestedValues": true,
"suggestedValues": [
"value1",
"value2",
"value3",
"value4"
]
}
但我想像键值对一样处理
"key1": {
"name": "name",
"key": "key1",
"placeholder": "some text...",
"type": "text",
"restrictToSuggestedValues": true,
**"suggestedValues": {
"key1" : "value1",
"key2" "value2",
"key3" : "value3",
"key4" : "value4"
}**
}
html部分:
<div class="input-group">
<nit-advanced-searchbox template-url="assets/templates/angular-advanced-searchbox.html"
ng-model="model.searchParams"
parameters="model.availableSearchParams"
parameters-display-limit="50"
advance-search="advSearch()"
placeholder="Search...">
</nit-advanced-searchbox>
<span class="input-group-btn">
<button type="button" class="btn btn-primary" id="searchButton" ng-click='actionsMethod(model.searchParams)'>
search
</button>
</span>
</div>