Skip to content

Commit 086225f

Browse files
rueckstiesskangas
authored andcommitted
INT-414 reset query when changing collections
1 parent 28afae9 commit 086225f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/home/collection.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ var MongoDBCollectionView = View.extend({
7070
}
7171
this.visible = true;
7272
this.hideEmptyMessage();
73+
74+
// temporarily stop listening to queryOption changes to avoid reloading twice
75+
this.stopListening(app.queryOptions, 'change');
76+
app.queryOptions.reset();
77+
this.listenTo(app.queryOptions, 'change', this.onQueryChanged.bind(this));
78+
7379
this.schema.ns = this.model._id = ns;
7480
debug('updating namespace to `%s`', ns);
7581
this.schema.reset();

0 commit comments

Comments
 (0)