aehlke/tag-it — Issue #42: trigger onTagRemoved event after updating tags for singleField- Code attached
Author: ravikiran438
Created: 2011-10-26 15:16:07+00:00
State: open

//this._trigger('onTagRemoved', null, tag); Need to trigger an event after the tag is updated

if (this.options.singleField) {
var tags = this.assignedTags();
var removedTagLabel = this.tagLabel(tag);
tags = $.grep(tags, function(el){
return el != removedTagLabel;
});
this._updateSingleTagsField(tags);
}

this._trigger('onTagRemoved', null, tag);

Since, previously even though the tag is removed, the input text value still remains the same and gets updated on next tag removal only.