aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-05-19 00:43:08 -0400
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-05-19 00:43:08 -0400
commitd5f5dfee3c9293515521bcc9a26064aab90880b9 (patch)
tree7a4ada453a7318f2bcdba9d521711342d2fda389 /src/client/views/nodes
parent7c18243dd38656b63334f48d9270d912ce6384fa (diff)
parent6919954467f3f2e4ca2f02e34eda827df9f5f83d (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into sharing_scenario
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/FilterBox.tsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/views/nodes/FilterBox.tsx b/src/client/views/nodes/FilterBox.tsx
index c97de3402..c892a9f6c 100644
--- a/src/client/views/nodes/FilterBox.tsx
+++ b/src/client/views/nodes/FilterBox.tsx
@@ -194,12 +194,12 @@ export class FilterBox extends ViewBoxBaseComponent<FieldViewProps, FilterBoxDoc
* Responds to clicking the check box in the flyout menu
*/
facetClick = (facetHeader: string) => {
- const targetDoc = FilterBox.targetDoc;
+ const { targetDoc } = FilterBox;
const found = this.activeAttributes.findIndex(doc => doc.title === facetHeader);
if (found !== -1) {
this.removeFilter(facetHeader);
} else {
- const allCollectionDocs = DocListCast((targetDoc.data as any)[0].data);
+ const allCollectionDocs = DocListCast((targetDoc.data as any)?.[0].data);
const facetValues = this.gatherFieldValues(targetDoc, facetHeader);
let nonNumbers = 0;
@@ -357,9 +357,7 @@ export class FilterBox extends ViewBoxBaseComponent<FieldViewProps, FilterBoxDoc
render() {
const facetCollection = this.props.Document;
- // TODO uncomment the line below when the treeview x works
- // const options = this._allFacets.filter(facet => this.currentFacets.indexOf(facet) === -1).map(facet => ({ value: facet, label: facet }));
- const options = this._allFacets.map(facet => ({ value: facet, label: facet }));
+ const options = this._allFacets.filter(facet => this.currentFacets.indexOf(facet) === -1).map(facet => ({ value: facet, label: facet }));
return this.props.dontRegisterView ? (null) : <div className="filterBox-treeView" style={{ width: "100%" }}>
<div className="filterBox-title">