diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-19 22:30:57 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-19 22:30:57 -0400 |
| commit | 5b7d51d47a967e679d17560771efe71522ada13a (patch) | |
| tree | 37773506a22949fce03c1e948d4406fd5c635df3 /src/client/views/pdf/PDFViewer.tsx | |
| parent | 78a519ad9ef690fbfebb494b50708ed25bb7225b (diff) | |
more cleanup of SearchBox. made searchMatch be a tri-state for forward/backward/nomatch
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
| -rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 965d568e6..0916e8b0c 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -152,7 +152,7 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu this._mainCont.current && (this._mainCont.current.scrollTop = this.layoutDoc._scrollTop || 0); this._searchReactionDisposer = reaction(() => this.Document.searchMatch, m => { - if (m) (this._lastSearch = true) && this.search(Doc.SearchQuery(), true); + if (m !== undefined) (this._lastSearch = true) && this.search(Doc.SearchQuery(), true); else !(this._lastSearch = false) && setTimeout(() => !this._lastSearch && this.search("", false, true), 200); }, { fireImmediately: true }); |
