-
In one of our project, i need to display a horizontal pager with finite, but unknown at init time number of pages and configurations, because this information is taken from a remote server. How can this be achieved? |
Beta Was this translation helpful? Give feedback.
Answered by
arkivanov
Aug 24, 2023
Replies: 1 comment 3 replies
-
I think you can load your data from the server and then convert it to a list of configurations, and then call |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can have initialPages an empty list. Then load initial pages from the server and use
navigate { it.copy(items = it.items + <new_batch>) }
to append the batch. Then on the UI side, listen while the user scrolls, and at some point notify the component to load the next batch. Would this work?