-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MDL bug for info] Cannot dynamically add Tabs #34
Comments
Interesting - I haven't seen this issue come up on ESBench, which uses dynamic tabs. Not sure why! |
Luck of the draw? ;) I'll have to take a look at that tomorrow and see what's different. |
heh - yeah probably. also it's probably an ancient version of mdl at this point. |
I've been getting some more janky results with MDL. I click on one TextField and a second one (and sometimes third) gets highlighted with it. It looks like MDL doesn't remove event listeners when The kicker for me is that MDL has been more or less abandoned by the project developers in favour of https://github.com/material-components/material-components-web, but the first I knew about it was half an hour ago when trying to find a fix in a newer branch of MDL. |
I'm really hoping to start work on a Preact wrapper around material-components-web. |
After reading this issue, I've started facepalming at my decision to go with mdl on a personal project. :/ I love how Google loves starting and torching projects even they deem as being the way forward. |
@developit If I thought I stood a chance of getting somewhere (anywhere) within a realistic timeframe I'd have started already. Life is too complicated at the moment. @KrofDrakula Exactly the same feeling here! |
I just discovered MDL and am trying to dynamically create tabs and tab content, and it seems impossible. :( |
This is for information for anyone else pulling their hair out - there's a fundamental flaw in the implementation of the tabs in MDL that you will hit in any dynamic frontend library.
google/material-design-lite#1165
Due to the way that the elements used for the tabs (and panels) are found and decorated, any tabs added to a tab set after an initial render won't get the JS listeners invoked. I've found that the first tab in the set gets a second listener instead of the second tab getting it.
There's workarounds in the linked issue - I'm trying to find the best one for my use case at the moment.
The text was updated successfully, but these errors were encountered: