Skip to content

Commit

Permalink
Start with empty table
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jul 13, 2018
1 parent 0aea0e2 commit 8f2de51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/JBrowse/View/Dialog/Search.js
Expand Up @@ -98,6 +98,10 @@ function (

this.errResults = dojo.create('div', { id: 'errResults', style: {margin: '10px', color: 'red'} }, container);
dialog.set('content', [ container, this.actionBar ]);

var g = this.locationListView.grid;
(g.store || g.collection).setData([]);
g.refresh();
dialog.show();

aspect.after(dialog, 'hide', dojo.hitch(this, function () {
Expand Down Expand Up @@ -145,14 +149,14 @@ function (
}
var g = this.locationListView.grid;
(g.store || g.collection).setData(grid);
this.locationListView.grid.refresh();
g.refresh();
this.errResults.innerHTML = '';
});
}, (err) => {
console.error(err);
var g = this.locationListView.grid;
(g.store || g.collection).setData([]);
this.locationListView.grid.refresh();
g.refresh();
this.errResults.innerHTML = 'Error: ' + err;
});
}
Expand Down

0 comments on commit 8f2de51

Please sign in to comment.