2017-12-12 12:38:23 +00:00
|
|
|
<vn-vertical class="dropdown-body" ng-if="$ctrl.show">
|
2017-11-23 13:07:55 +00:00
|
|
|
<vn-auto ng-show="$ctrl.filter" class="filter">
|
2017-06-22 10:03:01 +00:00
|
|
|
<vn-horizontal>
|
2017-09-14 11:40:55 +00:00
|
|
|
<input vn-one placeholder="{{'Search' | translate}}" type="text" ng-model="$ctrl.search"/>
|
2017-06-22 10:03:01 +00:00
|
|
|
<vn-icon vn-none icon="clear" ng-click="$ctrl.clearSearch()"></vn-icon>
|
|
|
|
</vn-horizontal>
|
2017-11-23 13:07:55 +00:00
|
|
|
</vn-auto>
|
|
|
|
<vn-auto>
|
2017-06-22 10:03:01 +00:00
|
|
|
<ul class="dropdown">
|
2018-01-16 12:54:21 +00:00
|
|
|
<li
|
2017-09-20 09:50:53 +00:00
|
|
|
ng-repeat="item in $ctrl.itemsFiltered track by $index"
|
2017-09-20 11:52:53 +00:00
|
|
|
ng-click="$ctrl.selectItem(item)"
|
|
|
|
ng-class="{'active': $index === $ctrl.activeOption, 'checked': item.checked}"
|
2017-09-20 09:50:53 +00:00
|
|
|
ng-mouseover="$ctrl.activeOption = $index"
|
|
|
|
>
|
2017-09-20 11:52:53 +00:00
|
|
|
<input type="checkbox" ng-checked="item.checked" ng-if="$ctrl.multiple">
|
|
|
|
<div ng-transclude="vnItem">{{item.name}}</div>
|
2017-09-20 09:50:53 +00:00
|
|
|
</li>
|
2017-10-03 07:16:02 +00:00
|
|
|
<li
|
2017-10-10 10:56:03 +00:00
|
|
|
ng-if="$ctrl.loadMore&&!$ctrl.removeLoadMore"
|
2017-10-03 07:16:02 +00:00
|
|
|
class="dropdown__loadMore"
|
2017-10-03 07:25:25 +00:00
|
|
|
ng-class="{'active': $ctrl.itemsFiltered.length === $ctrl.activeOption, 'noMore' : !$ctrl.showLoadMore}"
|
2017-10-03 07:16:02 +00:00
|
|
|
ng-click="$ctrl.loadItems()"
|
|
|
|
translate="{{$ctrl.showLoadMore ? 'Show More' : 'No more results'}}"
|
|
|
|
></li>
|
2017-06-22 10:03:01 +00:00
|
|
|
</ul>
|
2017-11-23 13:07:55 +00:00
|
|
|
</vn-auto>
|
2017-06-22 10:03:01 +00:00
|
|
|
</vn-vertical>
|