aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search/IconBar.tsx
diff options
context:
space:
mode:
authormadelinegr <monika_hedman@brown.edu>2019-06-18 16:09:48 -0400
committermadelinegr <monika_hedman@brown.edu>2019-06-18 16:09:48 -0400
commitb7f40e897805e84186bb35b84192d3d043a8ebd7 (patch)
treea7a67b80e2247fda4ba9059e2c9c078c46c17839 /src/client/views/search/IconBar.tsx
parent5469707d07254b5895c2188846c0e35b6d776ab0 (diff)
pretty sure things are working - committing before i start cleaning things up
Diffstat (limited to 'src/client/views/search/IconBar.tsx')
-rw-r--r--src/client/views/search/IconBar.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/client/views/search/IconBar.tsx b/src/client/views/search/IconBar.tsx
index f343ec13f..71fd593ec 100644
--- a/src/client/views/search/IconBar.tsx
+++ b/src/client/views/search/IconBar.tsx
@@ -13,6 +13,7 @@ import $ from 'jquery';
import { array } from 'prop-types';
import { IconButton } from './IconButton';
import { list } from 'serializr';
+import { SearchBox } from './SearchBox';
library.add(faSearch);
library.add(faObjectGroup);
@@ -39,7 +40,7 @@ export class IconBar extends React.Component<IconBarProps> {
static Instance: IconBar;
allIcons: string[] = [DocTypes.AUDIO, DocTypes.COL, DocTypes.HIST, DocTypes.IMG, DocTypes.LINK, DocTypes.PDF, DocTypes.TEXT, DocTypes.VID, DocTypes.WEB];
- @observable typesToFind: string[];
+ // @observable typesToFind: string[] = SearchBox.Instance.getIcons();
@observable public ResetClicked: boolean = false;
@observable public SelectAllClicked: boolean = false;
public Reset: number = 0;
@@ -47,19 +48,20 @@ export class IconBar extends React.Component<IconBarProps> {
constructor(props: IconBarProps) {
super(props);
- this.typesToFind = [DocTypes.AUDIO, DocTypes.COL, DocTypes.HIST, DocTypes.IMG, DocTypes.LINK, DocTypes.PDF, DocTypes.TEXT, DocTypes.VID, DocTypes.WEB];
+ // console.log("seting")
IconBar.Instance = this;
}
@action.bound
getList = (): string[] => {
- return this.typesToFind;
+ return SearchBox.Instance.getIcons();
}
@action.bound
updateList(newList: string[]) {
- this.typesToFind = newList;
- console.log(newList)
+ // this.typesToFind = newList;
+ SearchBox.Instance.updateIcon(newList)
+ // console.log(newList)
}
@action.bound
@@ -87,7 +89,7 @@ export class IconBar extends React.Component<IconBarProps> {
<div className="filter-description">Select All</div>
</div>
{this.allIcons.map((type: string) =>
- <IconButton type={type} active={this.typesToFind.indexOf(type) !== -1} getList={this.getList} updateList={this.updateList} />
+ <IconButton type={type}/>
)}
<div className="filter type-outer">
<div className={"type-icon none not-selected"}