Support infinite tabs natively #898
Comments
Hi :) I'd like to tackle on this issue. |
@Naturalclar feel free |
Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue. |
Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue. |
@satya164 @Naturalclar any news on this? |
Did the transition to react-native-pager-view make this feature any easier to achieve? |
Did you find any solution? |
I moved to a different library. |
@darkbasic can you tell us which library you are using from support infinity numbers of top tabs ? |
Have you solve this? |
@ht19 Not yet |
We should support infinite tabs in the library, so user can swipe in either direction infinitely.
Considerations
routes
array is unknown upfront, and routes can be added both to the beginning of the array and the end of the arrayHow we want to implement it
Currently the tabview works like this: if the
index
changes, we animate the tab change. For infinite pages, theindex
won't be stable, as pages could be added to the beginning of the routes array which will change the index even if the focused route is the same.A more reliable approach would be to check the
key
of the focused route. Eachroute
has a uniquekey
property. Even if theindex
changed, ifroute.key
of the focused route didn't change, then we shouldn't do an animated transition. We'll still need to adjust the translation value of the pages, but it should without an animation so that the user doesn't notice that and it happens transparently.Test code
User should be able to write the following code to render infinite pages:
The text was updated successfully, but these errors were encountered: