mirror of https://github.com/akveo/blur-admin
fix(select): allow use ng-nodel and ng-options(add timeout)
parent
9ccadd2433
commit
5a0c78e8a6
|
@ -9,11 +9,13 @@
|
|||
.directive('selectpicker', selectpicker);
|
||||
|
||||
/** @ngInject */
|
||||
function selectpicker() {
|
||||
function selectpicker($timeout) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function( $scope, elem) {
|
||||
$(elem).selectpicker();
|
||||
$timeout(function() {
|
||||
$(elem).selectpicker();
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/** @ngInject */
|
||||
function TablesPageCtrl($scope, $filter) {
|
||||
|
||||
$scope.smartTablePageSize = 12;
|
||||
$scope.smartTablePageSize = 10;
|
||||
|
||||
$scope.smartTableData = [
|
||||
{
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
<div class="horizontal-scroll">
|
||||
<div class="form-group select-page-size-wrap ">
|
||||
<select class="form-control" data-live-search="true" title="Rows on page" selectpicker>
|
||||
<option>1</option>
|
||||
<option>2</option>
|
||||
<option>3</option>
|
||||
<option>4</option>
|
||||
<option>5</option>
|
||||
</select>
|
||||
<label>Rows on page
|
||||
<select class="form-control selectpicker show-tick" title="Rows on page" selectpicker
|
||||
ng-model="smartTablePageSize" ng-options="i for i in [5,10,15,20,25]">
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<table class="table" st-table="smartTableData">
|
||||
<thead>
|
||||
|
|
Loading…
Reference in New Issue