developit / developit/preact-mdl
[MDL bug for info] Cannot dynamically add Tabs
- Dominant language
- JavaScript
- Stars
- 192
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
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.
https://github.com/google/material-design-lite/issues/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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.