Hello, i have been testing, and it seems that selectPreviousRow() doesn't work if the target index is not displayed, even delaying it (always jumps to index 0).
woh so i will need to change my solution to read from query directly, but then with js how i can filter? or i have to use query directly only? i need pagination as i have 50k records
what does your query do now - I'm expecting that it does the filtering and paging on the server and you don't load 50k records and then filter it in the table?
Great, so the searching/filtering on those 2 fields is already in the query, as is pagination - so now you will need to have those two buttons change the selected record and page as needed.
We've already seen some of the logic for that - increment the row index by 1 unless it's the last record in which case get the next page etc
You can store that in a pagination temporary variable along with the current selected row and then access it directly from the query data in the same way as you would with a table. A table is just an array of data that's neatly formatted, after all.
so:
temporary variable "paging" to be an object with properties like the pagination component eg
Your query can use these values instead of table.pagination etc
Your 'current row' of data can then be accessed with something like: query.data[pagination.value.currentRowIndex]
Have to say again, it feels like reinventing the wheel here and clicking "next record" to loop through 50k records seems a little user-unfriendly to me
yeah but thats how they have it in current MS Access app, they dont loop all, what they do in that screen is, filter by values in the blue container, so filter by Location for example then they loop tru all results that gave that Location*.
yeah i will try to use the idea of @dcartlidge , also i was thinking if theres no other alternative? at the end the client wants to be able to filter inside that app, also update add information, its that the only solution i have ? navigate all query with js?
{ pageSize: 10, offset: 0, currentPage: 0, currentRowIndex: {{currentIndex.value.currentRowIndex + 1}}, maxPages: 0 } but not sure how to get pageSize, offset, currentpage and maxpages?
@dcartlidge not sure how to do it like you said 'increment the row index by 1 unless it's the last record in which case get the next page etc'