I tried to type something in textfields in the demo page and find that I can't type in anything unless max_length is specified. I also tried that on textareas and the same thing happened. After browsing the code, I find that it is because maxLength is always specified in mwc-textarea/mwc-textfield even max_length is not specified for MatTextArea/MatTextField and as a result, maxLength becomes 0 and I can't type in anything.
This may be fixed by make max_length in TextAreaProps/TextFieldProps be Option<u64> and use maxLength=self.props.max_length.map(|v| Cow::from(v.to_string())) in view(), but old codes that use a &str to specify max_length have to be modified to be compilable, so I'm not sure if it is a good way to fix it.
I tried to type something in textfields in the demo page and find that I can't type in anything unless
max_length
is specified. I also tried that on textareas and the same thing happened. After browsing the code, I find that it is becausemaxLength
is always specified inmwc-textarea
/mwc-textfield
evenmax_length
is not specified forMatTextArea
/MatTextField
and as a result,maxLength
becomes 0 and I can't type in anything. This may be fixed by makemax_length
inTextAreaProps
/TextFieldProps
beOption<u64>
and usemaxLength=self.props.max_length.map(|v| Cow::from(v.to_string()))
inview()
, but old codes that use a&str
to specifymax_length
have to be modified to be compilable, so I'm not sure if it is a good way to fix it.