bogoslavskiy / react-native-tabs-section-list Goto Github PK
View Code? Open in Web Editor NEWReact Native SectionList with scrollable tabs
License: MIT License
React Native SectionList with scrollable tabs
License: MIT License
I want some functionality when i change the tabs at top...something like onpress in rendertab...i tried adding a onpress inside a text in view, but i am unable to scroll to the particular section..Please help
If one section's data is too large, I can't switch to other tab's page.
Any one can help me about that problem?
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.
I am 99% sure that this is something to do with your package. I have a nested Flatlist inside of it, but even when I replace that I still get the error. The package still seems to work - and work fine I should point out - so it's probably not an urgent issue, but thought I would raise it all the same.
When I put sectionList into scroll view it doesn't scroll, please give me the solution for this issue.
hi, thanks for this good package :
this is my array :
(6) [{…}, {…}, {…}, {…}, {…}, {…}]
and this is object of array :
data: {_id: "60631b49aa0bbe63062f97e7", name: "سوخاری ها", slug: "frize", preparation_duration: 25, show_calory: false, …}
title: "سوخاری ها"
and this is my SectionList
:
{this.state.categories.length > 0 ? <SectionList
renderItem={({ item, index, section }) => {
return (
<Text key={index}>{item.title}</Text>
)
}}
renderSectionHeader={({ section: { title } }) => (
<Text style={{ fontWeight: 'bold' }}>{title}</Text>
)}
renderTab={({ title, isActive }) => {
return (
<View
style={[
styles.tabContainer,
{ borderBottomWidth: isActive ? 1 : 0 }
]}
>
<Text
style={[
styles.tabText,
{ color: isActive ? '#090909' : '#9e9e9e' }
]}
>
{title}
</Text>
</View>
)
}
}
sections={this.state.categories}
keyExtractor={(item, index) => { console.log(item); index.toString() }}
/> :
<View><Text>Nothing</Text></View>}
but get this error :
Invariant Violation: Tried to get frame for out of range index 0
how to solve this ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.