:boom: A collection of Preact Components that encapsulate Google's Material Design Lite.
by developitLast 12 weeks · 0 commits
2 of 6 standards met
Hi. I came across an issue that, if I use className, when the preact components re-renders, the class attributes in my elements are lost. If I use "class", everything just works. I realize that preact recommends class over className, but since className was supposed to work as well (at least according to https://github.com/developit/preact/issues/103), I'd consider this a bug. This is a simple change, but I imagine this code is here for a reason. Thanks in advance!
Repository: developit/preact-mdl. Description: :boom: A collection of Preact Components that encapsulate Google's Material Design Lite. Stars: 193, Forks: 20. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Topics: material, material-design, mdl, preact, ui, ui-kit. Latest release: 2.2.2 (8y ago). Open PRs: 1, open issues: 10. Last activity: 7y ago. Community health: 42%. Top contributors: developit, impronunciable, unindented, joakimbeng, TheNeikos, pitermarx, tbekolay, alexkrolick, brenapp, cvuorinen and others.
JavaScript
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.
Hi, I run into this problem whem using the component Layout.Drawer on small devices. The problem is basically that the div with class 'mdl-layout__obfuscator' (the gray overlay) some times keeps the class 'is-visible' when the drawer is closed. I have reproduce this issue and you can find the link below Link I am using material-design-lite version 1.3.0 preact version 8.2.1 preact-mdl version 2.2.1 preact-router version 2.5.5