angular-multi-select icon indicating copy to clipboard operation
angular-multi-select copied to clipboard

Add option to show custom label on some options selected

Open pmomot opened this issue 8 years ago • 2 comments

There is need in option, like

'someSelectedLabel': 'Recipients selected'

that provides ability instead of showing every selected option in

.multiSelect > button

show only this label. Because in some cases users don't need to see all selected options, they need to know, that something is selected and this is enough.

None selected: http://prntscr.com/ajqxxw Some selected: http://prntscr.com/ajqyc5

pmomot avatar Mar 25 '16 09:03 pmomot

  1. add showSelectedText : '=', into scope

  2. ` $scope.$watch("showSelectedText" , function( newVal ) {

            if( newVal ) {
                $scope.showSelectedText = newVal;
            }
        });`
    
  3. add a judgement for refreshbutton: else if (typeof $scope.showSelectedText !== 'undefined' && $scope.showSelectedText !== "") { //https://github.com/isteven/angular-multi-select/issues/424 $scope.varButtonLabel = $scope.showSelectedText; } isteven-multi-select.zip

lybing avatar Mar 29 '16 14:03 lybing

@pmomot ,

Sorry for the late reply;

Indeed there are some requests regarding custom text on the button. I'll see what I can do for the next release.

isteven avatar Jun 01 '16 01:06 isteven