Hide the tags input field when it's empty
This commit is contained in:
parent
bbe8f4ed0d
commit
7745b1ac29
|
@ -118,8 +118,15 @@
|
|||
this.selectedTagsCollection.fetch({
|
||||
success: function(collection) {
|
||||
collection.fetched = true;
|
||||
self._inputView.setData(collection.map(modelToSelection));
|
||||
|
||||
var appliedTags = collection.map(modelToSelection);
|
||||
self._inputView.setData(appliedTags);
|
||||
|
||||
if (appliedTags.length !== 0) {
|
||||
self.$el.removeClass('hidden');
|
||||
} else {
|
||||
self.$el.addClass('hidden');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue