mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Fix top search not working due to missing button type
This commit is contained in:
parent
fa47595ac8
commit
023c931401
@ -17,7 +17,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<input class="form-control form-control-sm" type="text" placeholder="Search documents" aria-label="Search"
|
<input class="form-control form-control-sm" type="text" placeholder="Search documents" aria-label="Search"
|
||||||
[formControl]="searchField" [ngbTypeahead]="searchAutoComplete" (keyup)="searchFieldKeyup($event)" (selectItem)="itemSelected($event)" i18n-placeholder>
|
[formControl]="searchField" [ngbTypeahead]="searchAutoComplete" (keyup)="searchFieldKeyup($event)" (selectItem)="itemSelected($event)" i18n-placeholder>
|
||||||
<button *ngIf="!searchFieldEmpty" class="btn btn-link btn-sm px-0 position-absolute top-0 end-0" (click)="resetSearchField()">
|
<button type="button" *ngIf="!searchFieldEmpty" class="btn btn-link btn-sm px-0 position-absolute top-0 end-0" (click)="resetSearchField()">
|
||||||
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-x me-1" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-x me-1" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path fill-rule="evenodd" d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
|
<path fill-rule="evenodd" d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
@ -91,6 +91,15 @@ export class AppFrameComponent implements OnInit, ComponentCanDeactivate {
|
|||||||
this.isMenuCollapsed = true
|
this.isMenuCollapsed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get openDocuments(): PaperlessDocument[] {
|
||||||
|
return this.openDocumentsService.getOpenDocuments()
|
||||||
|
}
|
||||||
|
|
||||||
|
@HostListener('window:beforeunload')
|
||||||
|
canDeactivate(): Observable<boolean> | boolean {
|
||||||
|
return !this.openDocumentsService.hasDirty()
|
||||||
|
}
|
||||||
|
|
||||||
searchField = new FormControl('')
|
searchField = new FormControl('')
|
||||||
|
|
||||||
get searchFieldEmpty(): boolean {
|
get searchFieldEmpty(): boolean {
|
||||||
@ -107,15 +116,6 @@ export class AppFrameComponent implements OnInit, ComponentCanDeactivate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get openDocuments(): PaperlessDocument[] {
|
|
||||||
return this.openDocumentsService.getOpenDocuments()
|
|
||||||
}
|
|
||||||
|
|
||||||
@HostListener('window:beforeunload')
|
|
||||||
canDeactivate(): Observable<boolean> | boolean {
|
|
||||||
return !this.openDocumentsService.hasDirty()
|
|
||||||
}
|
|
||||||
|
|
||||||
searchAutoComplete = (text$: Observable<string>) =>
|
searchAutoComplete = (text$: Observable<string>) =>
|
||||||
text$.pipe(
|
text$.pipe(
|
||||||
debounceTime(200),
|
debounceTime(200),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user