material design - How to set min and max number of tags on Materialize CSS tag input -
are there options (for instance) can added material_chip
make possible? (the official docs doesn't specify whether or how accomplish this). if not, work around can use achieve this?
you can use chip.add
, chip.delete
events disable possibility of adding new tag , enable again when user removes tag. example:
$('.chips').on('chip.add', function(e, chip){ // check current number of tags/chips - disable if need }); $('.chips').on('chip.delete', function(e, chip){ // enable again });
Comments
Post a Comment