Skip to content

Commit

Permalink
Merge pull request #1406 from thostetler/1384-author-affiliation-pers…
Browse files Browse the repository at this point in the history
…isting-options

Reset Tool On Render
  • Loading branch information
ehenneken authored Mar 14, 2018
2 parents 612e47d + 5ba0e3d commit addd500
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/js/widgets/author_affiliation_tool/widget.jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ define([
renderWidgetForCurrentQuery: function ({ currentQuery }) {
const pubsub = this.getPubSub();

// reset on load
this.store.dispatch(actions.appReset());

// do nothing if we don't get a query
if (currentQuery) {
const q = currentQuery.clone();
Expand Down Expand Up @@ -123,6 +126,9 @@ define([
* @returns {*}
*/
renderWidgetForListOfBibcodes: function (ids) {

// reset on load
this.store.dispatch(actions.appReset());
return this.fetchAffiliationData(ids);
},

Expand Down Expand Up @@ -220,10 +226,8 @@ define([
* Close the widget
*/
closeWidget: function () {
const { dispatch } = this.store;
const pubsub = this.getPubSub();
pubsub.publish(pubsub.NAVIGATE, "results-page");
dispatch(actions.appReset());
},

/**
Expand Down

0 comments on commit addd500

Please sign in to comment.