mirror of
https://github.com/getredash/redash.git
synced 2025-12-25 01:03:20 -05:00
Set select2 options via object
This commit is contained in:
@@ -68,6 +68,9 @@
|
||||
template: '<filters></filters>\n' + Visualization.renderVisualizationsTemplate,
|
||||
replace: false,
|
||||
link: function (scope) {
|
||||
scope.select2Options = {
|
||||
width: '50%'
|
||||
}
|
||||
scope.$watch('queryResult && queryResult.getFilters()', function (filters) {
|
||||
if (filters) {
|
||||
scope.filters = filters;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="well well-sm" ng-show="filters">
|
||||
<div ng-repeat="filter in filters">
|
||||
{{filter.friendlyName}}:
|
||||
<select ui-select2='{width:"50%"}' ng-model="filter.current" ng-multiple="{{filter.multiple}}">
|
||||
<select ui-select2='select2Options' ng-model="filter.current" ng-multiple="{{filter.multiple}}">
|
||||
<option ng-repeat="value in filter.values" value="{{value}}">{{value}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user