Skip to content

Conversation

@GvS666
Copy link
Contributor

@GvS666 GvS666 commented Sep 25, 2013

New option: limit - disables input after adding number of tags equal to limit, re-enables it after removing tags below limit
New methods: enable, disable, isEnabled - they work on input only.

New methods: enable, disable, isEnabled
@GvS666 GvS666 mentioned this pull request Sep 25, 2013
@MrWeb
Copy link

MrWeb commented Sep 25, 2013

Great and how is this used in the JS or HTML Code? Can you give an example?

timschlechter added a commit that referenced this pull request Oct 5, 2013
Limit number of tags, enable/disable input
@timschlechter timschlechter merged commit dd1fcc2 into mdbootstrap:master Oct 5, 2013
@timschlechter
Copy link
Contributor

Thnx for the contribution!
Sorry for the long wait, I've been out for a while and came to conclusion my deploy mechanism isn't flexible enough to do quick merges of pull requests. Will try to fix this soon

@timschlechter
Copy link
Contributor

I refactored the code a bit, added some tests and documentation. Changes:

  • renamed the 'limit' options to 'maxTags'
  • when tagsinput contains maximum number of tags, the element gets a 'bootstrap-tagsinput-max' class

@hitodev
Copy link

hitodev commented Mar 7, 2015

Thanks but the dropdown still remains if user to type maxTag + 1

#307

@dincio
Copy link

dincio commented Mar 22, 2015

@hitodev how did you do that? my maxTag does not work
$('input').tagsinput({
maxTag: 3
});

@shihasck
Copy link

shihasck commented Nov 3, 2016

@dincio its 'maxTags' not 'maxTag'. I know its a late reply but may be helpful in future. :)

@rohitkhatri
Copy link

@dincio How to set maxTags as data attribute in the input tag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants