diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/search/FilterBox.tsx | 19 | ||||
-rw-r--r-- | src/client/views/search/SearchBox.tsx | 10 |
2 files changed, 1 insertions, 28 deletions
diff --git a/src/client/views/search/FilterBox.tsx b/src/client/views/search/FilterBox.tsx index ddc63255c..62c04d9b0 100644 --- a/src/client/views/search/FilterBox.tsx +++ b/src/client/views/search/FilterBox.tsx @@ -70,11 +70,10 @@ export class FilterBox extends React.Component { // might need to add to search box componentDidMount = () => { - document.addEventListener("pointerdown", (e) => { if (e.timeStamp !== this._pointerTime) { - // this.closeSearch(); SearchBox.Instance.closeSearch(); + console.log("closing search from inside component did mount") } }); } @@ -281,12 +280,6 @@ export class FilterBox extends React.Component { // } //-------------------------------------------------------------------------------------------------------------- - // @action.bound - // closeSearch = () => { - // this._filterOpen = false; - // this._resultsOpen = false; - // this._results = []; - // } @action.bound openFilter = () => { @@ -321,16 +314,6 @@ export class FilterBox extends React.Component { this._pointerTime = time; } - // @action.bound - // openSearch(e: React.PointerEvent) { - // e.stopPropagation(); - // this._openNoResults = false; - // this._filterOpen = false; - // this._resultsOpen = true; - // this._pointerTime = e.timeStamp; - // } - - @action.bound public closeFilter() { this._filterOpen = false; diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index b371df380..bd2e40ed3 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -39,16 +39,6 @@ export class SearchBox extends React.Component<SearchBoxProps> { SearchBox.Instance = this; } - // componentDidMount = () => { - // document.addEventListener("pointerdown", (e) => { - // console.log(e.timeStamp, FilterBox.Instance._pointerTime) - // console.log("this is in the click for determining whether or not to close search") - // if (e.timeStamp !== FilterBox.Instance._pointerTime) { - // this.closeSearch(); - // } - // }); - // } - @action getViews = async (doc: Doc) => { const results = await SearchUtil.GetViewsOfDocument(doc); |