Clear table after fetch from server
Clears the table of stories when fetching a new list of stories. This seems a bit drastic, but it ensures that the state icons are updated as well (instead of just the titles).
This commit is contained in:
parent
fae20212e6
commit
4b910d426f
1 changed files with 1 additions and 0 deletions
|
@ -247,6 +247,7 @@ var StoryPage = React.createClass({
|
||||||
loadStoriesFromServer: function() {
|
loadStoriesFromServer: function() {
|
||||||
$.get(this.props.url)
|
$.get(this.props.url)
|
||||||
.done(function(data) {
|
.done(function(data) {
|
||||||
|
this.setState({data: []});
|
||||||
this.setState({data: data});
|
this.setState({data: data});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue