diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html index 52710aca2..4acd7a904 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.html +++ b/src-ui/src/app/components/document-detail/document-detail.component.html @@ -56,7 +56,7 @@ Details - + = new Subject() previewUrl: string downloadUrl: string downloadOriginalUrl: string @@ -91,7 +92,19 @@ export class DocumentDetailComponent implements OnInit, OnDestroy, DirtyComponen private documentListViewService: DocumentListViewService, private documentTitlePipe: DocumentTitlePipe, private toastService: ToastService, - private settings: SettingsService) { } + private settings: SettingsService) { + this.titleSubject.pipe( + debounceTime(200), + distinctUntilChanged(), + takeUntil(this.unsubscribeNotifier) + ).subscribe(titleValue => { + this.documentForm.patchValue({'title': titleValue}) + }) + } + + titleKeyUp(event) { + this.titleSubject.next(event.target?.value) + } get useNativePdfViewer(): boolean { return this.settings.get(SETTINGS_KEYS.USE_NATIVE_PDF_VIEWER)