gramene-search 2.15.3 → 2.15.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1345,6 +1345,14 @@ const $af4441dd29af05df$var$handleIdList = (queryObject)=>{
1345
1345
  };
1346
1346
  $af4441dd29af05df$var$grameneFilters.reactGrameneFilters = (0, $gXNCa$reduxbundler.createSelector)('selectQueryObject', 'selectGrameneFilters', 'selectActiveGenomes', 'selectUrlObject', (queryObject, filters, genomes, myUrl)=>{
1347
1347
  if (filters.status === 'init') {
1348
+ // A shared-view link (?view=<hash>) is restored asynchronously by
1349
+ // bootViewFromUrl once the snapshot (and, for private views, the auth
1350
+ // token) has loaded. Do nothing here: clearing filters + running an
1351
+ // unfiltered search would race the restore and leave the restored filter
1352
+ // in the tree but never applied to the search (the stale unfiltered
1353
+ // result stays put). Staying 'init' means the first — and only — search
1354
+ // is the one the snapshot triggers, with the filter in place.
1355
+ if (queryObject.hasOwnProperty('view')) return;
1348
1356
  if (queryObject.filters) {
1349
1357
  const newFilters = JSON.parse(queryObject.filters);
1350
1358
  let actions = [