mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Table scrolling and sorting
This commit is contained in:
@@ -8,6 +8,8 @@ import { Difficulty, Instrument } from 'scan-chart'
|
||||
import { environment } from 'src-angular/environments/environment'
|
||||
import { AdvancedSearch, ChartData, SearchResult } from 'src-shared/interfaces/search.interface'
|
||||
|
||||
const resultsPerPage = 25
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
@@ -61,7 +63,7 @@ export class SearchService {
|
||||
this.search().subscribe()
|
||||
}
|
||||
|
||||
get areMorePages() { return this.songsResponse.page && this.groupedSongs.length === this.songsResponse.page * 10 }
|
||||
get areMorePages() { return this.songsResponse.page && this.groupedSongs.length === this.songsResponse.page * resultsPerPage }
|
||||
|
||||
/**
|
||||
* General search, uses the `/search?q=` endpoint.
|
||||
@@ -83,7 +85,7 @@ export class SearchService {
|
||||
let retries = 10
|
||||
return this.http.post<SearchResult>(`${environment.apiUrl}/search`, {
|
||||
search,
|
||||
per_page: 25,
|
||||
per_page: resultsPerPage,
|
||||
page: this.currentPage,
|
||||
instrument: this.instrument.value,
|
||||
difficulty: this.difficulty.value,
|
||||
|
||||
Reference in New Issue
Block a user