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:
Tom Willemse 2013-07-13 19:19:36 +02:00
parent fae20212e6
commit 4b910d426f

View file

@ -247,6 +247,7 @@ var StoryPage = React.createClass({
loadStoriesFromServer: function() {
$.get(this.props.url)
.done(function(data) {
this.setState({data: []});
this.setState({data: data});
}.bind(this));
},