Support removing custom fields by emptying their title, too

This commit is contained in:
Dennis Ploeger 2019-01-02 14:31:08 +01:00
parent a6c97e496e
commit 20ed2fd33c
1 changed files with 5 additions and 0 deletions

View File

@ -68,6 +68,11 @@ const FieldViewCustom = FieldViewText.extend({
if (newTitle && newTitle !== this.model.title) {
this.model.title = newTitle;
this.model.titleChanged = true;
} else if (newTitle === '') {
this.trigger('change', {
field: '$' + this.model.title,
val: ''
});
}
this.$el.find('.details__field-label').text(this.model.title);
delete this.labelInput;