I'm using the materialize chips in my project but wanted to avoid this default behavior of adding the same empty tag, for example:
How do I prevent this and insert the tag only when I have at least one character?
What I got closer was:
$('.chips').on('chip.add', function(e, chip){
console.log(chip);
var chip = chip.tag;
if(!chip.trim()){
alert('CHIP VAZIO!');
//aqui gostaria de fazer algo do tipo chip.remove() porém da erro
}
});