Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Possibility to have no labels shown at all (max-labels = 0) #14

Closed
filaruina opened this issue Jun 2, 2014 · 2 comments · Fixed by #16
Closed

Feature Request: Possibility to have no labels shown at all (max-labels = 0) #14

filaruina opened this issue Jun 2, 2014 · 2 comments · Fixed by #16
Labels

Comments

@filaruina
Copy link
Contributor

Hi,

First of all, thanks for the amazing plugin, just started using it after some pain trying some others and it works perfectly for us.
I would like to request one (probably) simple feature.
If I use max-labels="0" it would be displayed (Total: N) once I select one or more itens.
In my use case, the dropdown would show:
None selected
(Total: 1)
(Total: 3)
etc...

Thanks a lot!

PS: I'll take a look if that's so simple, if so, probably will submit a pull request whenever possible. =)

@isteven
Copy link
Owner

isteven commented Jun 3, 2014

Hi @filaruina ,

I'm quite busy working on the grouping features at the moment, so I suggest you to fork and modify the code yourself for now ( and submit a pull request, of course 😄 ).

Here are some pointers:

  1. Find this part - and remove the && $scope.maxLabels !== "0"
 if ( typeof $scope.maxLabels !== 'undefined' && $scope.maxLabels !== '' && $scope.maxLabels !== "0" ) {
  1. Then you'll need to modify somewhere along this part:
$scope.varButtonLabel += ', ... (Total: ' + $scope.selectedItems.length + ')';

That's the one creating the button label.

I hope you enjoy the challenge 😄 ... Kindly star the project if you like it. Cheers!

@filaruina
Copy link
Contributor Author

Will do it! Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants