From 4b910d426fb17b80b3341915f7b77c0cb5311bd2 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 13 Jul 2013 19:19:36 +0200 Subject: [PATCH] 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). --- static/js/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/main.js b/static/js/main.js index f19351c..0a40489 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -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)); },