2017-09-20 11:52:53 +00:00
|
|
|
<vn-vertical class="dropdown-body" ng-show="$ctrl.show">
|
2017-06-22 10:03:01 +00:00
|
|
|
<vn-one ng-show="$ctrl.filter" class="filter">
|
|
|
|
<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>
|
|
|
|
</vn-one>
|
|
|
|
<vn-one>
|
|
|
|
<ul class="dropdown">
|
2017-09-20 11:52:53 +00:00
|
|
|
<li tabIndex="-1"
|
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
|
|
|
|
ng-if="$ctrl.loadMore"
|
|
|
|
class="dropdown__loadMore"
|
|
|
|
tabIndex="-1"
|
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>
|
|
|
|
</vn-one>
|
|
|
|
</vn-vertical>
|