You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
its sometimes hard to understand why a tag isn't added when you enter a duplicate. i like it when the existing tag quickly flashes so you know its already there.
not posting this as a pull request because i'm sure it could be done in a nicer way.
// ~ line 80
if ($.grep(self.itemsArray, function(item) { return self.options.itemValue(item) === itemValue; } )[0]){
$.each( self.$container.find( ".tag" ), function( i, e ){
if( self.options.itemValue( $(this).data( "item" ) ) == itemValue ){
$(this).hide().fadeIn();
}
} );
return;
}
best, hansi.
The text was updated successfully, but these errors were encountered:
Nice addition, I implemented this in a1e07e3 (v0.3.7)
I modified the implementation a bit, so that you provide a function in the options (onTagExists), in which you can handle this situation as you like. Default, I implemented the behaviour you suggested (hide and fadeIn).
its sometimes hard to understand why a tag isn't added when you enter a duplicate. i like it when the existing tag quickly flashes so you know its already there.
not posting this as a pull request because i'm sure it could be done in a nicer way.
best, hansi.
The text was updated successfully, but these errors were encountered: