Replies: 1 comment
-
In other words, would it be possible to assign a paginator to a AkitaMatDataSource before assigning a query (a store)? In this way, if the store is already populated with a lot of data, the paginator would be already in place to limit the table size. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a problem to submit using AkitaMatDataSource and MatPaginator.
I have a service, handling an akita source with cached data
In my component.ts,
The server response contains 2500 items.
The first time this component is displayed, everything is OK, nothing is in the cache. The component is displayed with an empty table. When data comes back from the server (after ngAfterViewInit) , the store is updated and the table is displayed with the number of rows fixed by the paginator => OK
The second time the component is displayed, data is already in the cache (2500 items). Data source is udated in the init method, wehreas the paginator is not yet set to the datasource. => 2500 rows are first created in the table, that takes a very long time. And then, on ngAfterViewInit, the paginator is set, and everything becomes OK.
Does anyone have an idea how can I manage this ?
Would it be possible to change the query of AkitaMatDataSource after its creation?
Beta Was this translation helpful? Give feedback.
All reactions