diff options
| author | madelinegr <monika_hedman@brown.edu> | 2019-06-06 17:08:38 -0400 |
|---|---|---|
| committer | madelinegr <monika_hedman@brown.edu> | 2019-06-06 17:08:38 -0400 |
| commit | 7e3493a95aaf8d4ba585b326c278556e39346f11 (patch) | |
| tree | 184fdd33d187a3098a9a8cc0575293e93f75b855 /src/client/views/SearchItem.tsx | |
| parent | bff9c34aa8294cd8ec09b968cfea95280b383c77 (diff) | |
opening and closing filter and results works
Diffstat (limited to 'src/client/views/SearchItem.tsx')
| -rw-r--r-- | src/client/views/SearchItem.tsx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/client/views/SearchItem.tsx b/src/client/views/SearchItem.tsx index 16a2aa790..c80d9baa2 100644 --- a/src/client/views/SearchItem.tsx +++ b/src/client/views/SearchItem.tsx @@ -55,9 +55,7 @@ export class SelectorContextMenu extends React.Component<SearchItemProps> { } getOnClick({ col, target }: { col: Doc, target: Doc }) { - console.log("hello world") return () => { - console.log("returning!") col = Doc.IsPrototype(col) ? Doc.MakeDelegate(col) : col; if (NumCast(col.viewType, CollectionViewType.Invalid) === CollectionViewType.Freeform) { const newPanX = NumCast(target.x) + NumCast(target.width) / NumCast(target.zoomBasis, 1) / 2; @@ -70,19 +68,20 @@ export class SelectorContextMenu extends React.Component<SearchItemProps> { }; } + onClick = () => { + console.log("click"); + } + + //these all need class names in order to find ancestor - please do not delete render() { return ( - < div className="parents" onClick = {() => {console.log("hello there")}}> - <p>Contexts:</p> - {this._docs.map(doc => <div className="collection"><a onPointerDown={(e: React.PointerEvent) => { - console.log("pointerdown"); - e.preventDefault(); - e.stopPropagation() + < div className="parents"> + <p className = "contexts">Contexts:</p> + {this._docs.map(doc => <div onClick={this.onClick} className="collection"><a className= "title" onClick={(e: React.MouseEvent) => { + console.log("clicked"); this.getOnClick(doc) }}>{doc.col.title}</a></div>)} - {this._otherDocs.map(doc => <div className="collection"><a onClick={(e: React.MouseEvent) => { - e.preventDefault(); - e.stopPropagation() + {this._otherDocs.map(doc => <div className="collection"><a className= "title" onClick={(e: React.MouseEvent) => { console.log("clicked"); this.getOnClick(doc) }}>{doc.col.title}</a></div>)} |
