diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/SearchUtil.ts | 3 | ||||
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 2 | ||||
-rw-r--r-- | src/client/views/search/SearchBox.tsx | 7 |
3 files changed, 5 insertions, 7 deletions
diff --git a/src/client/util/SearchUtil.ts b/src/client/util/SearchUtil.ts index 2cc64f415..68c981399 100644 --- a/src/client/util/SearchUtil.ts +++ b/src/client/util/SearchUtil.ts @@ -1,3 +1,4 @@ +import { ObservableMap } from 'mobx'; import { Doc, DocListCast, Field, Opt } from '../../fields/Doc'; import { Id } from '../../fields/FieldSymbols'; import { StrCast } from '../../fields/Types'; @@ -44,7 +45,7 @@ export namespace SearchUtil { ]; query = query.toLowerCase(); - const results = new Map<Doc, string[]>(); + const results = new ObservableMap<Doc, string[]>(); if (collectionDoc) { const docs = DocListCast(collectionDoc[Doc.LayoutFieldKey(collectionDoc)]); const docIDs: String[] = []; diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index be19fc50f..d19c9f07d 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -1785,7 +1785,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection ); } get pannableContents() { - this.incrementalRender(); + setTimeout(this.incrementalRender); return ( <CollectionFreeFormPannableContents Document={this.Document} diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 5dc4f5550..c8caff9fa 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -55,9 +55,6 @@ export class SearchBox extends ViewBoxBaseComponent<SearchBoxProps>() { @observable _deletedDocsStatus: boolean = false; @observable _onlyEmbeddings: boolean = true; - /** - * This is the constructor for the SearchBox class. - */ constructor(props: SearchBoxProps) { super(props); makeObservable(this); @@ -69,11 +66,11 @@ export class SearchBox extends ViewBoxBaseComponent<SearchBoxProps>() { * the search panel, the search input box is automatically selected. This allows the user to * type in the search input box immediately, without needing clicking on it first. */ - componentDidMount = action(() => { + componentDidMount() { if (this._inputRef.current) { this._inputRef.current.focus(); } - }); + } /** * This method is called when the SearchBox component is about to be unmounted. When the user |