mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Refactor
This commit is contained in:
parent
7df631f1b0
commit
90eb7c3713
@ -170,7 +170,7 @@ describe('PreviewPopupComponent', () => {
|
||||
dispatch: jest.fn(),
|
||||
} as any)
|
||||
const dispatchSpy = jest.spyOn(component.pdfViewer.eventBus, 'dispatch')
|
||||
component.onViewerLoaded()
|
||||
component.onPageRendered()
|
||||
expect(dispatchSpy).toHaveBeenCalledWith('find', {
|
||||
query: 'test',
|
||||
caseSensitive: false,
|
||||
|
@ -116,7 +116,8 @@ export class PreviewPopupComponent implements OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
onViewerLoaded() {
|
||||
onPageRendered() {
|
||||
// Only triggered by the pngx pdf viewer
|
||||
if (this.documentService.searchQuery) {
|
||||
this.pdfViewer.eventBus.dispatch('find', {
|
||||
query: this.documentService.searchQuery,
|
||||
|
Loading…
x
Reference in New Issue
Block a user