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);
|
.directive('selectpicker', selectpicker);
|
||||||
|
|
||||||
/** @ngInject */
|
/** @ngInject */
|
||||||
function selectpicker() {
|
function selectpicker($timeout) {
|
||||||
return {
|
return {
|
||||||
restrict: 'A',
|
restrict: 'A',
|
||||||
link: function( $scope, elem) {
|
link: function( $scope, elem) {
|
||||||
$(elem).selectpicker();
|
$timeout(function() {
|
||||||
|
$(elem).selectpicker();
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
/** @ngInject */
|
/** @ngInject */
|
||||||
function TablesPageCtrl($scope, $filter) {
|
function TablesPageCtrl($scope, $filter) {
|
||||||
|
|
||||||
$scope.smartTablePageSize = 12;
|
$scope.smartTablePageSize = 10;
|
||||||
|
|
||||||
$scope.smartTableData = [
|
$scope.smartTableData = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
<div class="horizontal-scroll">
|
<div class="horizontal-scroll">
|
||||||
<div class="form-group select-page-size-wrap ">
|
<div class="form-group select-page-size-wrap ">
|
||||||
<select class="form-control" data-live-search="true" title="Rows on page" selectpicker>
|
<label>Rows on page
|
||||||
<option>1</option>
|
<select class="form-control selectpicker show-tick" title="Rows on page" selectpicker
|
||||||
<option>2</option>
|
ng-model="smartTablePageSize" ng-options="i for i in [5,10,15,20,25]">
|
||||||
<option>3</option>
|
</select>
|
||||||
<option>4</option>
|
</label>
|
||||||
<option>5</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<table class="table" st-table="smartTableData">
|
<table class="table" st-table="smartTableData">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
Loading…
Reference in New Issue