Skip to content

Commit 220c0d8

Browse files
committed
fix: reset group toc search after reload
1 parent a86a832 commit 220c0d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

eln/Toc.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,14 @@ class Toc {
122122
: defaultSampleFilter;
123123
delete sampleFilter.startEpoch;
124124
delete sampleFilter.endEpoch;
125-
API.createData(varName, sampleFilter);
125+
if (sampleFilter.previousGroup && !sampleFilter.group) {
126+
sampleFilter.group = sampleFilter.previousGroup;
127+
}
126128

127129
this.updateOptions(sampleFilter);
128130

131+
API.createData(varName, sampleFilter);
132+
129133
const sampleFilterTwig = `
130134
{% if sampleFilter.startEpoch %}
131135
<span style="color: red; font-size: 1.3em; font-weight: bold">Searching for a specific sample.</span>&nbsp;<button onclick="resetFilterOptions()">Reset</button>
@@ -192,7 +196,6 @@ console.log(API);
192196
: undefined;
193197
this.options.endkey = undefined;
194198
}
195-
console.log(this.options);
196199
}
197200

198201
/**

0 commit comments

Comments
 (0)