Trigger for calling loadNext() on iOS
See original GitHub issueThe sample that’s in repo has following (for table view)
if (indexPath.row == count - 1) {
viewModel.pager.loadNext()
}
In my SwiftUI iOS client right now I have
if data.shouldDisplayNextPage {
nextPageView
}
....
private var nextPageView: some View {
HStack {
Spacer()
VStack {
ProgressView()
Text("Loading next page...")
}
Spacer()
}
.onAppear(perform: {
data.fetchNextData()
})
}
data
above is view model that calls in to shared KMP code. What I think I’m missing right now is how that shouldDisplayNextPage
can be implemented. For example would it make sense to expose nextKey
from Pager
(or maybe there’s already some way to infer this?) Could also perhaps be returned from call to loadNext()
?
If you like I can create PR with this change?
(note above client code is in https://github.com/joreilly/MortyComposeKMM/tree/multiplatform-paging …updated with 0.3.4 changes)
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Communication triggers in Shortcuts on iPhone or iPad
Communication triggers in Shortcuts on iPhone or iPad. Use a communication trigger to run an automation when you receive an email or message....
Read more >Flutter Live Objects/Collections - Amity Docs
It has loadNext() method to fetch more data. It also exposes hasNext property to check if next page or previous page is present....
Read more >What triggers UITableView to load its data first time?
When you create a table view with a delegate and data source you can call reloadData on it to force it to go...
Read more >TableView RxSwiftified way to detect Scroll reached ... - GitHub
I know the regular way of scrollviewdelegate and setting the delegate to trigger scrollviewdidscroll, However now i am using RxAlamofire and i ...
Read more >Paginate data with query cursors | Firestore - Firebase
Return a subset of the data. Paginate query results. However, to define a specific range for a query, you should use the where()...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Whoops. Seems like the upload failed just for android. Could you try it again? I republished the same version
Changes have been merged to main branch of https://github.com/joreilly/MortyComposeKMM