diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-05 17:28:15 -0400 | 
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-05 17:28:15 -0400 | 
| commit | 50ddaaab31351ad277fbd2ebb4405a99a721a536 (patch) | |
| tree | 9a41e3f3d15365807b95413ba1603f00c2433123 /src/client/views/nodes/QueryBox.tsx | |
| parent | f9e34ffc8b21780d966a149e5ba4459c602a6eed (diff) | |
| parent | d254d35d8d1fc10e9ca7ef5b9db06cd138b2d102 (diff) | |
Merge branch 'master' into menu_restructure
Diffstat (limited to 'src/client/views/nodes/QueryBox.tsx')
| -rw-r--r-- | src/client/views/nodes/QueryBox.tsx | 71 | 
1 files changed, 34 insertions, 37 deletions
| diff --git a/src/client/views/nodes/QueryBox.tsx b/src/client/views/nodes/QueryBox.tsx index 0fff0b57f..1b6056be6 100644 --- a/src/client/views/nodes/QueryBox.tsx +++ b/src/client/views/nodes/QueryBox.tsx @@ -1,41 +1,38 @@ -import React = require("react"); -import { IReactionDisposer } from "mobx"; -import { observer } from "mobx-react"; -import { documentSchema } from "../../../fields/documentSchemas"; -import { Id } from '../../../fields/FieldSymbols'; -import { makeInterface, listSpec } from "../../../fields/Schema"; -import { StrCast, Cast } from "../../../fields/Types"; -import { ViewBoxAnnotatableComponent } from '../DocComponent'; -import { SearchBox } from "../search/SearchBox"; -import { FieldView, FieldViewProps } from './FieldView'; -import "./QueryBox.scss"; -import { List } from "../../../fields/List"; -import { SnappingManager } from "../../util/SnappingManager"; +// import React = require("react"); +// import { IReactionDisposer } from "mobx"; +// import { observer } from "mobx-react"; +// import { documentSchema } from "../../../new_fields/documentSchemas"; +// import { Id } from '../../../new_fields/FieldSymbols'; +// import { makeInterface, listSpec } from "../../../new_fields/Schema"; +// import { StrCast, Cast } from "../../../new_fields/Types"; +// import { ViewBoxAnnotatableComponent } from '../DocComponent'; +// import { SearchBox } from "../search/SearchBox"; +// import { FieldView, FieldViewProps } from './FieldView'; +// import "./QueryBox.scss"; +// import { List } from "../../../new_fields/List"; +// import { SnappingManager } from "../../util/SnappingManager"; -type QueryDocument = makeInterface<[typeof documentSchema]>; -const QueryDocument = makeInterface(documentSchema); +// type QueryDocument = makeInterface<[typeof documentSchema]>; +// const QueryDocument = makeInterface(documentSchema); -@observer -export class QueryBox extends ViewBoxAnnotatableComponent<FieldViewProps, QueryDocument>(QueryDocument) { -    public static LayoutString(fieldKey: string) { return FieldView.LayoutString(QueryBox, fieldKey); } -    _docListChangedReaction: IReactionDisposer | undefined; -    componentDidMount() { -    } +// @observer +// export class QueryBox extends ViewBoxAnnotatableComponent<FieldViewProps, QueryDocument>(QueryDocument) { +//     public static LayoutString(fieldKey: string) { return FieldView.LayoutString(QueryBox, fieldKey); } +//     _docListChangedReaction: IReactionDisposer | undefined; +//     componentDidMount() { +//     } -    componentWillUnmount() { -        this._docListChangedReaction?.(); -    } +//     componentWillUnmount() { +//         this._docListChangedReaction?.(); +//     } -    render() { -        const dragging = !SnappingManager.GetIsDragging() ? "" : "-dragging"; -        return <div className={`queryBox${dragging}`} onWheel={(e) => e.stopPropagation()} > -            <SearchBox -                id={this.props.Document[Id]} -                setSearchQuery={q => this.dataDoc.searchQuery = q} -                searchQuery={StrCast(this.dataDoc.searchQuery)} -                setSearchFileTypes={q => this.dataDoc.searchFileTypes = new List<string>(q)} -                searchFileTypes={Cast(this.dataDoc.searchFileTypes, listSpec("string"), [])} -                filterQquery={StrCast(this.dataDoc.filterQuery)} /> -        </div >; -    } -}
\ No newline at end of file +//     render() { +//         const dragging = !SnappingManager.GetIsDragging() ? "" : "-dragging"; +//         return <div className={`queryBox${dragging}`} onWheel={(e) => e.stopPropagation()} > +             +//             <SearchBox  Document={this.props.Document}  /> +//         </div >; +//     } +// } + +// //<SearchBox id={this.props.Document[Id]} sideBar={side} Document={this.props.Document} searchQuery={StrCast(this.dataDoc.searchQuery)} filterQuery={this.dataDoc.filterQuery} /> | 
