Open mgr34 opened 5 years ago
Yes definitely sounds like a bug without investigating this. Let's leave this open until someone can take a look. For now its good to have your workaround recorded. Thank you!
From the MDC Web end, this is expected behavior if you initialize a text field inside a closed dialog, because notched outline needs the elements to be in flow to measure correctly. This can be remedied by calling layout
on the text field component when the MDCDialog:opened
event is fired.
See also https://github.com/material-components/material-components-web/issues/4328#issuecomment-459473464
Ah thanks for the insight @kfranqueiro - I think then the React version should have some prop to trigger the foundation.layout
method.
Not sure this is a bug per say, but wanted to share an issue I ran into.
I have a
<TextField outlined label={this.state.label}/>
in a<Dialog/>
. Since the TextField is mounted while the dialog is not visible thehandleWidthChange
method ofFloatingLabel
reports a zero width. ThereforeNotchedOutline
carves out a zero-width notch. And lays atop the label. [0]For my purposes I can avoid this issue via:
and
I believe this is likely a bug, but I cannot proffer a solution to it just yet. Maybe I will later, but I don't know that I will have time to return to this issue in the near future. Additionally, I would imagine this is not limited to the Dialog, but this is where I ran into my issue.
[0] https://i.imgur.com/xU8vzYL.png