better handling of unchanged tags
This commit is contained in:
+9
-4
@@ -1647,6 +1647,10 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
componentWillReceiveProps: function(nextProps){
|
||||||
|
this.setState({tags: nextProps.tags});
|
||||||
|
},
|
||||||
|
|
||||||
handleShowTagManager: function() {
|
handleShowTagManager: function() {
|
||||||
this.setState({activated: true});
|
this.setState({activated: true});
|
||||||
},
|
},
|
||||||
@@ -1693,7 +1697,7 @@
|
|||||||
tags.push(inp);
|
tags.push(inp);
|
||||||
}
|
}
|
||||||
this.props.onSubmit(tags);
|
this.props.onSubmit(tags);
|
||||||
this.setState({activated: false, tagInput: '', tags: tags});
|
this.setState({activated: false, tagInput: '', tags: this.props.tags});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleCancel: function() {
|
handleCancel: function() {
|
||||||
@@ -4174,9 +4178,10 @@
|
|||||||
|
|
||||||
handleUpdateAccountTagsRequest: function(tags) {
|
handleUpdateAccountTagsRequest: function(tags) {
|
||||||
var instance = this;
|
var instance = this;
|
||||||
Tinode.getMeTopic().setMeta({tags: tags}).catch(function(err) {
|
Tinode.getMeTopic().setMeta({tags: tags})
|
||||||
instance.handleError(err.message, "err");
|
.catch(function(err) {
|
||||||
});
|
instance.handleError(err.message, "err");
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// User chose Settings menu item.
|
// User chose Settings menu item.
|
||||||
|
|||||||
Reference in New Issue
Block a user