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.

Tabs/Tab not working on initial load

See original GitHub issue

I have created a react component using Tabs, It is not working on initial load but works once i reload the page.

My render function is as below

  <Tabs className='tab-demo z-depth-1'>
              <Tab title="Components" active>
              <form className="col s12">
                      <div className="row">
                      <div className="input-field col s5">
                          <input id="file_search" type="text" className="validate" />
                          <label htmlFor="file_search">Search</label>
                      </div>
                      <div style={styles.restorecomp}>
                          <span className="btn indigo darken-4 selectdrop" onClick={this.open}><i className="material-icons left">restore</i> Restore a Component</span>&nbsp;&nbsp;&nbsp;&nbsp;
                          <span className="btn indigo darken-4 selectdrop" onClick={this.save} ><i className="material-icons left">save</i> Save</span>
                          </div>

                      </div>
                  </form>

              <table className="highlight centered" id="files">
  					<thead>
  						<tr>
                                  <th data-field="comp"> Name</th>
                                  <th data-field="type">Type</th>
                                  <th data-field="version">Version</th>
                                  <th data-field="user">Data Source</th>
  						</tr>
  					</thead>
                      <tbody>
                      </tbody>

  </table>
              </Tab>
              <Tab title="Data Sources"><form className="col s12">
                      <div className="row">
                      <div className="input-field col s5">
                          <input id="ds_search" type="text" className="validate" />
                          <label htmlFor="ds_search">Search</label>
                      </div>
                      <div style={styles.restorecomp}>
  <span className="btn indigo darken-4 selectdrop" onClick={this.dsopen}><i className="material-icons left">restore</i> Restore DataSource</span>&nbsp;&nbsp;&nbsp;&nbsp;
                          <span className="btn indigo darken-4 selectdrop" onClick={this.save}><i className="material-icons left">save</i> Save</span>
                          </div>

                      </div>
                  </form>

              <table className="highlight centered" id="ds">
  					<thead>
  						<tr>
                                  <th data-field="comp"> Alias</th>
                                  <th data-field="tname"> Name</th>
                                  <th data-field="connection">Connection</th>
                                  <th data-field="type">Type</th>
                                  <th data-field="version">Version</th>
  						</tr>
  					</thead>
                      <tbody>
                      </tbody>

  </table></Tab>
              <Tab title="Files"><form className="col s12">
                      <div className="row">
                      <div className="input-field col s5">
                          <input id="fv_search" type="text" className="validate" />
                          <label htmlFor="fv_search">Search</label>
                      </div>
                      <div style={styles.restorecomp}>
  <span className="btn indigo darken-4 selectdrop" onClick={this.fileopen}><i className="material-icons left">restore</i> Restore a File</span>&nbsp;&nbsp;&nbsp;&nbsp;
                          <span className="btn indigo darken-4 selectdrop" onClick={this.save}><i className="material-icons left">save</i> Save</span>
                          </div>

                      </div>
                  </form>

              <table className="highlight centered" id="fv">
  					<thead>
  						<tr>
                                  <th data-field="comp">Name</th>
                                  <th data-field="type">Path</th>
                                  <th data-field="version">Version</th>
  						</tr>
  					</thead>
                      <tbody>
                      </tbody>

  </table></Tab>
            </Tabs>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
alextrasterocommented, Jan 2, 2017

#201 Sorry for the delay 0.17.7 Fixes this issue

1reaction
anshuul-kaicommented, Dec 29, 2016

Same problem here. Tabs worked fine on 0.15.2 and are now broken on 0.17.6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tabs/Tab not working on initial load in react-materialize
I have created a react component using Tabs, It is not working on initial load but works once i reload the page.
Read more >
react-tabs - npm
Start using react-tabs in your project by running `npm i react-tabs`. ... react-tabs does not include any style loading by default.
Read more >
Tab components - React-Bootstrap
Tabs is a higher-level component for quickly creating a Nav matched with a set of TabPane s. ... as this causes both usability...
Read more >
Content of all tabs visible on page load
I notice that when the page initially loads, content of all tabs are visible for a few ... This is wrong. after click...
Read more >
JavaScript - Bootstrap
For the sake of this demonstration, we are using data-loading-text and $().button('loading') , but that's not the only state you can use. See...
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