question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tab style not working

See original GitHub issue

I have gone through these following points

version

node: 10.9.0
npm: 6.2.0
"react": "16.4.1",
"react-native": "0.56.0",
"native-base": "^2.8.0"

Expected behaviour:

style should be apply to TabHeading

Actual behaviour

style not working for TabHeading

Steps to reproduce

i am applying background color but its not working

screen shot 2018-09-19 at 6 01 14 pm

you can see in image there is not red or green color as i expect.

<Tabs>
     <Tab
          heading={
               <TabHeading
                        activeTabStyle={{ backgroundColor: 'green' }}
                        tabStyle={{ backgroundColor: "red" }}
               >
                     <Text>Comment</Text>
               </TabHeading>}>
           <Comment comment={comments}/>
     </Tab>
      <Tab 
             heading={
                     <TabHeading 
                            activeTabStyle={{ backgroundColor: 'green' }} 
                            tabStyle={{ backgroundColor: "red" }}
                     >
                          <Text>History</Text>
                      </TabHeading>}>
                 <History comment={comments} stackUsers={this.props.stackUsers} />
       </Tab>
</Tabs>

Is the bug present in both iOS and Android or in any one of them?

this issue is in IOS, not sure about android

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:26 (10 by maintainers)

github_iconTop GitHub Comments

13reactions
adrianolskcommented, Oct 3, 2018

@ZeroCool00 I found a solution to my problem, gonna post here case anyone else needs, check if it solves yours.

     <Tabs tabBarUnderlineStyle={{ backgroundColor: "yellow" }}>
          <Tab
            heading={
              <TabHeading style={{ backgroundColor: "green" }}>
                <Text>Camera</Text>
              </TabHeading>
            }
          >
            <Tab1 />
          </Tab>
          <Tab heading="Tab2">
            <Tab2 />
          </Tab>
          <Tab heading="Tab3">
            <Tab3 />
          </Tab>
        </Tabs>
5reactions
linux08commented, Mar 5, 2019

This worked for me


<Tabs>
  <Tab
    heading="Your Projects"
    activeTabStyle={{ backgroundColor: '#201D41' }}
    tabStyle={{ backgroundColor: '#FFFFFF' }}
  >
    <Tab1 />
  </Tab>
  <Tab
    heading="Your Proposals"
    activeTabStyle={{ backgroundColor: '#201D41' }}
    tabStyle={{ backgroundColor: '#FFFFFF' }}
  >
    <Tab2 />
  </Tab>
</Tabs>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why isn't my active tab styling being applied? - Stack Overflow
I have added border color as green to active tab using CSS but when I was clicking a tab border color green as...
Read more >
Style not working on tabs · Issue #1698 · valor-software/ngx ...
In my case it'd work if the styling are set in the global styles.css file, but not when they're set inside the component's...
Read more >
Style for dataTables does not work for all my tabs
I have 5 tabs that I would like to have the data styled But it only works for the first tab.
Read more >
Elementor Style tab on Widget Panel Not Working
Whenever I try to edit the page and edit any element or section and click on the “Style” tab, nothing appears there. I...
Read more >
Navs - Bootstrap
Documentation and examples for how to use Bootstrap's included navigation components.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found