mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Add pagination for advanced search
This commit is contained in:
@@ -124,9 +124,7 @@ export class ResultTableComponent implements OnInit {
|
||||
const table = this.resultTableDiv.nativeElement
|
||||
if (this.router.url === '/browse' && table.scrollHeight - (table.scrollTop + table.clientHeight) < 100) {
|
||||
// Scrolled near the bottom of the table
|
||||
if (this.searchService.areMorePages && !this.searchService.searchLoading) {
|
||||
this.searchService.search(this.searchService.searchControl.value || '*', true).subscribe()
|
||||
}
|
||||
this.searchService.getNextSearchPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ export class SearchBarComponent implements OnInit, AfterViewInit {
|
||||
maxMaxNPS: null as number | null,
|
||||
minYear: null as number | null,
|
||||
maxYear: null as number | null,
|
||||
modifiedAfter: this.fb.nonNullable.control('', { validators: dateVaidator }),
|
||||
modifiedAfter: this.fb.nonNullable.control('', { validators: dateValidator }),
|
||||
hash: this.fb.nonNullable.control(''),
|
||||
trackHash: this.fb.nonNullable.control(''),
|
||||
hasSoloSections: null as boolean | null,
|
||||
@@ -231,9 +231,9 @@ export class SearchBarComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
}
|
||||
|
||||
function dateVaidator(control: AbstractControl) {
|
||||
function dateValidator(control: AbstractControl) {
|
||||
if (control.value && isNaN(Date.parse(control.value))) {
|
||||
return { 'dateVaidator': true }
|
||||
return { 'dateValidator': true }
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user