Skip to content

Commit b4b7543

Browse files
committed
Bugfix search loading indicator
1 parent ea52520 commit b4b7543

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

jbrowse/api-src/org/labkey/api/jbrowse/JBrowseFieldDescriptor.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public class JBrowseFieldDescriptor {
2525
private String _category = null;
2626
private String _url = null;
2727

28+
private Integer _flex = null;
29+
2830
public JBrowseFieldDescriptor(String luceneFieldName, @Nullable String description, boolean isInDefaultColumns, boolean isIndexed, VCFHeaderLineType type, Integer orderKey) {
2931
_fieldName = luceneFieldName;
3032
_label = luceneFieldName;
@@ -162,6 +164,11 @@ public void setDescription(String description)
162164
_description = description;
163165
}
164166

167+
public void setFlex(Integer flex)
168+
{
169+
_flex = flex;
170+
}
171+
165172
public JSONObject toJSON() {
166173
JSONObject fieldDescriptorJSON = new JSONObject();
167174
fieldDescriptorJSON.put("name", _fieldName);
@@ -178,6 +185,7 @@ public JSONObject toJSON() {
178185
fieldDescriptorJSON.put("allowableValues", _allowableValues);
179186
fieldDescriptorJSON.put("category", _category);
180187
fieldDescriptorJSON.put("url", _url);
188+
fieldDescriptorJSON.put("flex", _flex);
181189

182190
return fieldDescriptorJSON;
183191
}

jbrowse/src/client/JBrowse/VariantSearch/components/VariantTableWidget.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import '../../jbrowse.css';
4242
import LoadingIndicator from './LoadingIndicator';
4343

4444
const VariantTableWidget = observer(props => {
45-
const { assembly, assemblyName, trackId, locString, parsedLocString, sessionId, session, pluginManager } = props
45+
const { assembly, trackId, parsedLocString, sessionId, session, pluginManager } = props
4646
const { assemblyNames, assemblyManager } = session
4747
const { view } = session
4848

@@ -61,6 +61,7 @@ const VariantTableWidget = observer(props => {
6161

6262
function handleSearch(data) {
6363
setFeatures(APIDataToRows(data.data, trackId))
64+
setDataLoaded(true)
6465
}
6566

6667
function handleModalClose(widget) {
@@ -74,7 +75,8 @@ const VariantTableWidget = observer(props => {
7475
window.history.pushState(null, "", currentUrl.toString());
7576

7677
setFilters(passedFilters);
77-
fetchLuceneQuery(passedFilters, sessionId, trackGUID, currentOffset, (json)=>{handleSearch(json)}, (error) => {setError(error)});
78+
setDataLoaded(false)
79+
fetchLuceneQuery(passedFilters, sessionId, trackGUID, currentOffset, (json)=>{handleSearch(json)}, (error) => {setDataLoaded(true);setError(error)});
7880
}
7981

8082
const TableCellWithPopover = (props: { value: any }) => {

0 commit comments

Comments
 (0)