gramene-search 2.0.1 → 2.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gramene-search",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "search wrapper for gramene",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/index.js",
@@ -115,7 +115,7 @@ const grameneViews = {
115
115
  const touched = raw.touched || {};
116
116
  const numFound = (search && search.response && search.response.numFound) || 0;
117
117
  const hasFilters = !!(filters && filters.rightIdx > 1);
118
- const resultDependentIds = new Set(['taxonomy', 'list']);
118
+ const resultDependentIds = new Set(['taxonomy', 'list', 'export']);
119
119
  const autoDisable = (numFound === 0) || !hasFilters;
120
120
  const hasFirebase = !!(config && config.firebaseConfig);
121
121
 
@@ -137,6 +137,10 @@ const grameneViews = {
137
137
  if (touched[v.id]) return v;
138
138
  return { ...v, show: o };
139
139
  });
140
+ const anyOtherOn = options.some(v => v.id !== 'help' && v.show === 'on');
141
+ if (!anyOtherOn) {
142
+ options = options.map(v => v.id === 'help' ? { ...v, show: 'on' } : v);
143
+ }
140
144
  return { ...raw, options };
141
145
  }
142
146
  )