-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
this.root_ is not available in getDefaultFoundation() #242
Comments
Ah, you're totally right; super subtle bug. We will fix it, add a regression test, and add a comment as to why the code needs to be structured that way. |
PR for this is coming today. However FYI as a tip when writing your own foundations, you usually want to wait to call all adapter methods until |
Good point Travis. Thank you very much! |
Hello!
Since this commit this.root_ is not accessible anymore from the getDefaultFoundation() hook of child classes of MDCComponent. This is an issue when authoring custom vanilla components since the majority of adapter APIs need a reference to the root element.
Steps to reproduce
What MDC-Web Version are you using?
"@material/base": "0.1.1"
(0.1.0 works.)
What is the expected behavior?
The console should output a reference to the component DOMElement.
What is the actual behavior?
The console outputs undefined.
The text was updated successfully, but these errors were encountered: