Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Fixed tabs in demo are broken #347

Closed
dortzur opened this issue Jul 13, 2016 · 5 comments
Closed

Fixed tabs in demo are broken #347

dortzur opened this issue Jul 13, 2016 · 5 comments
Labels

Comments

@dortzur
Copy link

dortzur commented Jul 13, 2016

Trying to to change between fixed tabs in the Layout section is broken, throws an exception. Also lot's of "React is not defined" error floating around

screen shot 2016-07-13 at 11 51 14 am

@tleunen tleunen added the bug label Jul 13, 2016
@tleunen
Copy link
Owner

tleunen commented Jul 13, 2016

The React is not defined is an issue only on the website, not sure yet to know why it's happening.
Thanks for reporting the issue with the Tabs, will definitely take a look at it.

@worrel
Copy link

worrel commented Jul 20, 2016

The charAt issue with tabs is because the tab JS expects an href like '#some-id' on each tab which it then strips the '#' off of & attempts to find a layout-tab-panel with the corresponding ID to show. This sucks because with React you'd really like to have only the active tab in the DOM & switch it out based on state change. Not sure if you can just catch the click event & preventDefault, but you'd likely lose the ripple effect.

@HriBB
Copy link
Contributor

HriBB commented Aug 2, 2016

Hey. I can confirm this. Any ideas how to fix it?

@HriBB
Copy link
Contributor

HriBB commented Aug 2, 2016

Until there is a proper fix, this is the ugly workaround to get rid of the error

Header

<HeaderTabs activeTab={activeTab}>
  <Tab href="#salon-info">Info</Tab>
  <Tab href="#salon-customers">Customers</Tab>
  <Tab href="#salon-services">Services</Tab>
  <Tab href="#salon-brands">Brands</Tab>
  <Tab href="#salon-gallery">Gallery</Tab>
</HeaderTabs>

Content

<Content>
  {this.props.children}  
  <div className="mdl-layout__tab-panel" id="salon-info">Info</div>
  <div className="mdl-layout__tab-panel" id="salon-customers">Customers</div>
  <div className="mdl-layout__tab-panel" id="salon-services">Services</div>
  <div className="mdl-layout__tab-panel" id="salon-brands">Brands</div>
  <div className="mdl-layout__tab-panel" id="salon-gallery">Gallery</div>
</Content>

Styles

.mdl-layout__tab-panel {
  display: none !important;
}

@HriBB
Copy link
Contributor

HriBB commented Aug 2, 2016

Furthermore, I get an error if I show/hide HeaderTabs

DOMChildrenOperations.js:67 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

So I have to hide them with css

Last, ripple effect does not work on Tabs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants