Giter Site home page Giter Site logo

yeswanth / react-native-dynamic-tab-view Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 12.0 250 KB

React Native component for creating dynamic tab layouts

JavaScript 60.70% Java 7.91% Objective-C 21.75% Starlark 9.65%
component dynamic react-native tabview

react-native-dynamic-tab-view's People

Contributors

fullerlee avatar harpreetcd avatar indupal avatar iyifr avatar maherzaidoune avatar priyathamv avatar protoerik avatar yashgada avatar yeswanth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-dynamic-tab-view's Issues

Can't customize tabItemContainer style

It becomes necessary to customise the tabItemContainer, for example if one needs to remove the bottom padding below the Highlight, or add a background or so.
I'll share a pull request to make it available as a prop. Naming it tabItemContainerStyle is a mouthfull, but let me know if you have any better ideas.
Line 19 at DynamicTabViewScrollHeader.js

Tabs in index 3 and 5 are not scrolling back

<DynamicTabView data={productCategories.map((item, index) => { return { title: item.catName, key: item.catId, }; })} renderTab={(cat) => ( <FlatList data={productData.filter((item) => item.catName === cat.title)} removeClippedSubview={true} windowSize={17} initialNumToRender={8} numColumns={2} keyExtractor={(item, index) => index} renderItem={(item) => <Product key={item.itemId} product={item} />} /> )} onChangeTab={onChangeTab} defaultIndex={defaultIndex} containerStyle={{flex: 1}} headerBackgroundColor="white" headerUnderlayColor="#E85123" headerTextStyle={{color: 'black'}} />

TypeError: Cannot read property '0' of undefined

I am using FlatList under renderItem Method
<DynamicTabView
data={this.state.data}
renderTab={this._renderItem}
defaultIndex={this.state.defaultIndex}
containerStyle={styles.container}
headerBackgroundColor={"white"}
headerTextStyle={styles.headerText}
onChangeTab={this.onChangeTab}
headerUnderlayColor={"blue"}
/>

header styling not working

Hello,

Im trying to change the color of text inside tabs, but they are unchangeable (always white) and cant give it 100% width .

Screen Shot 2019-06-13 at 9 51 47 PM

I need to make the header with full width grey

Add types

Hello! I'm really enjoying this library, since I need dynamic tabs in many projects. However it would be nice to have some typedefinitions. If there are typedefinitions please tell me how to access them since npm install @types/react-native-dynamic-tab-view does not exist :)

Default Index is not working.

When using this TabView with a default index to open a specific tab the default index is not working. Even though if I am trying to set it statically then also it is not working.

<DynamicTabView
        data={tabNames}
        renderTab={_renderTabItem}
        defaultIndex={defaultIndex}
        containerStyle={styles.tabContainer}
        headerBackgroundColor={'#8e8e8e'}
        headerTextStyle={styles.headerText}
        onChangeTab={(index) => onChangeTab(index)}
        headerUnderlayColor={'#8e8e8e'}
        headerContainerStyle={{ backgroundColor: '#afafaf' }}
        headerActiveTextStyle={{ color: '#8e8e8e' }}
        highlightStyle={{ backgroundColor: '#8e8e8e' }}
        tabContainerStyle={{}}
        noHighlightStyle={{ backgroundColor: '#8e8e8e' }}
        extraData={{}} />

Scroll bug

1 When you reach to the last tab(lets say 10th tab) and still swipe right. The 9th tab gets selected
2 Swipe right again and then the 10th tab header
3. Steps 1 and 2 goes in a loop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.