From 60a104c342217508c78ba30a8be4a489d384e72d Mon Sep 17 00:00:00 2001 From: Erin Wu Date: Thu, 12 Jun 2014 13:30:24 -0700 Subject: [PATCH] allow default title shown on the menu dropdown --- angular-multi-select.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/angular-multi-select.js b/angular-multi-select.js index dd610f4..9153ab0 100644 --- a/angular-multi-select.js +++ b/angular-multi-select.js @@ -49,6 +49,7 @@ angular.module( 'multi-select', ['ng'] ).directive( 'multiSelect' , [ '$sce', '$ tickProperty : '@', disableProperty : '@', orientation : '@', + defaultLabel : '@', maxLabels : '@', isDisabled : '=', directiveId : '@', @@ -179,7 +180,7 @@ angular.module( 'multi-select', ['ng'] ).directive( 'multiSelect' , [ '$sce', '$ // Write label... if ( $scope.selectedItems.length === 0 ) { - $scope.varButtonLabel = 'None selected'; + $scope.varButtonLabel = ($scope.defaultLabel)? $scope.defaultLabel : 'None selected'; } else { var tempMaxLabels = $scope.selectedItems.length;