Skip to content

Commit 43d5d33

Browse files
committed
Added no-labels-label attribute support
When using max-labels="0" this PR supports an additional attribute named "no-labels-label" to specify a label to be displayed before the selected items count, example: no-labels-label="some label here" if 3 items are selected, the button will show: "some label here (3)"
1 parent d558989 commit 43d5d33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

isteven-multi-select.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,9 @@ angular.module( 'isteven-multi-select', ['ng'] ).directive( 'istevenMultiSelect'
550550
if (tempMaxLabels > 0) {
551551
$scope.varButtonLabel += ', ... ';
552552
}
553+
else if ( typeof attrs.noLabelsLabel !== 'undefined' && attrs.noLabelsLabel !== '' ) {
554+
$scope.varButtonLabel += attrs.noLabelsLabel + ' ';
555+
}
553556
$scope.varButtonLabel += '(' + $scope.outputModel.length + ')';
554557
}
555558
}

0 commit comments

Comments
 (0)