[Library] Add Infinite Scrolling

Add infinite scrolling and fix selecting rows
This commit is contained in:
2025-05-04 16:45:21 +02:00
parent 35fd50c728
commit f0453a3daf
9 changed files with 127 additions and 43 deletions

View File

@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core'
import { ChartData } from 'src-shared/interfaces/search.interface'
import { ChartData, LibrarySearch } from 'src-shared/interfaces/search.interface'
@Injectable({
providedIn: 'root',
@@ -17,8 +18,14 @@ export class StorageService {
return window.electron.invoke.removeCharts(charts)
}
async getChartsBySearchTerm(searchTerm?: string): Promise<ChartData[]> {
return window.electron.invoke.getChartsBySearchTerm(searchTerm)
async getChartsBySearchTerm(searchTerm?: string, page?: number, pageSize?: number): Promise<ChartData[]> {
const librarySearch = {
searchTerm: searchTerm,
page: page,
pageSize: pageSize,
} as LibrarySearch
return window.electron.invoke.getChartsBySearchTerm(librarySearch)
}
async removeAllCharts(): Promise<void> {