react-native-tabs-section-list icon indicating copy to clipboard operation
react-native-tabs-section-list copied to clipboard

Enhancement - Reverse tabs order

Open ghost opened this issue 4 years ago • 0 comments

I came across a simple obstacle on this package that i needed to use on an app of mine and that is to have the tabs reversed. This is: in the example where you start with "Burgers" and end with "Dessert", on the tabs "Burgers" would be the last tab on the list and "Dessert" the first one, and the list would start active on "Burgers" as it is now.

I played a bit with the source code and using the JS reverse function i made it, but i couldn't figure out how to do this reversion on the beginning to prevent the animation on the tabs going from the first to the last index. And it bugged when clicking on a tab to go to a category since the indexes are not corresponding to the right one.

To clarify the purpose of this feature, it is to do something similar to what the Revolut App does on its dashboard with the transactions history where i will have a list of items categorized by month/year and while scrolling i want it to move the tabs to the previous month and so on. And for that it makes sense that all the previous dates are before the current one.

ghost avatar Aug 13 '19 08:08 ghost