From e65fba03470cc38bc610baf4ff77fcc13cc08b74 Mon Sep 17 00:00:00 2001 From: madelinegr Date: Tue, 11 Jun 2019 16:47:15 -0400 Subject: lint errors fixed --- src/client/views/search/IconBar.tsx | 35 +++++++++++++++++------------------ src/client/views/search/SearchBox.tsx | 8 ++++---- src/client/views/search/ToggleBar.tsx | 4 ++-- 3 files changed, 23 insertions(+), 24 deletions(-) (limited to 'src/client/views/search') diff --git a/src/client/views/search/IconBar.tsx b/src/client/views/search/IconBar.tsx index 3f5d11d8f..3f77d64eb 100644 --- a/src/client/views/search/IconBar.tsx +++ b/src/client/views/search/IconBar.tsx @@ -95,6 +95,7 @@ export class IconBar extends React.Component { @action.bound unselectAllRefs() { + this.allRefs.forEach(element => { if (element.current) { element.current.setAttribute("data-selected", "false"); @@ -105,16 +106,16 @@ export class IconBar extends React.Component { @action.bound alternateRef(ref: any) { if (ref.getAttribute("data-selected") === "true") { - ref.setAttribute("data-selected", "false") + ref.setAttribute("data-selected", "false"); } else { - ref.setAttribute("data-selected", "true") + ref.setAttribute("data-selected", "true"); } } @action.bound onClick = (value: string) => { - let icons: string[] = this.props.getIcons() + let icons: string[] = this.props.getIcons(); let ref = this.getRef(value); this.alternateRef(ref); if (value === DocTypes.NONE) { @@ -150,15 +151,13 @@ export class IconBar extends React.Component { } getInitialStatus = (type: string) => { - console.log(this.getRef(type)) if (this.originalFilteredNodes.includes(type)) { - return "true" + return "true"; } - return "false" + return "false"; } render() { - console.log("rendering") return (
Filter by type of node
@@ -167,7 +166,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.NONE) }}> + onClick={() => { this.onClick(DocTypes.NONE); }}>
Clear
@@ -176,7 +175,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.PDF) }}> + onClick={() => { this.onClick(DocTypes.PDF); }}>
PDF
@@ -185,7 +184,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.HIST) }}> + onClick={() => { this.onClick(DocTypes.HIST); }}>
Histogram
@@ -194,7 +193,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.COL) }}> + onClick={() => { this.onClick(DocTypes.COL); }}>
Collection
@@ -203,7 +202,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.IMG) }}> + onClick={() => { this.onClick(DocTypes.IMG); }}>
Image
@@ -212,7 +211,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.VID) }}> + onClick={() => { this.onClick(DocTypes.VID); }}>
Video
@@ -221,7 +220,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.WEB) }}> + onClick={() => { this.onClick(DocTypes.WEB); }}>
Web
@@ -230,7 +229,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.LINK) }}> + onClick={() => { this.onClick(DocTypes.LINK); }}>
Link
@@ -239,7 +238,7 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.AUDIO) }}> + onClick={() => { this.onClick(DocTypes.AUDIO); }}>
Audio
@@ -248,13 +247,13 @@ export class IconBar extends React.Component {
{ this.onClick(DocTypes.TEXT) }}> + onClick={() => { this.onClick(DocTypes.TEXT); }}>
Text
- ) + ); } } diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index e9146a6d1..deeb56762 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -47,14 +47,14 @@ export class SearchBox extends React.Component { if(!this._wordStatus){ let oldWords = query.split(" "); let newWords: string[] = []; - console.log(oldWords) + console.log(oldWords); oldWords.forEach(word => { let newWrd = "+" + word; newWords.push(newWrd); - }) - console.log(newWords) + }); + console.log(newWords); - query = newWords.join(" ") + query = newWords.join(" "); } //gets json result into a list of documents that can be used diff --git a/src/client/views/search/ToggleBar.tsx b/src/client/views/search/ToggleBar.tsx index 7dbb3b767..e7fd86d30 100644 --- a/src/client/views/search/ToggleBar.tsx +++ b/src/client/views/search/ToggleBar.tsx @@ -64,7 +64,7 @@ export class ToggleBar extends React.Component{ translateX: -totalWidth, easing: "easeInOutQuad", duration: 500 - }) + }); } } @@ -88,5 +88,5 @@ export class ToggleBar extends React.Component{ ); - }; + } } \ No newline at end of file -- cgit v1.2.3-70-g09d2