You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this. Took me a bit to figure out that HTMLAttributes doesn't do anything... Got this properly working and applied the same fix to all of the input elements in RMWC.
RMWC or MDC?
RMWC
What RMWC Version are you using?
1.8.3
What browser(s) and React Version is this bug affecting?
All
What build system are you using?
Create React App (TypeScript)
What is the expected behavior?
The input element of html has "name" attribute, which is usually used to handle the change of value.
For example, assumed I have an input element:
And a handleChange function:
Then I can bind the onChange event to my handleChange function:
What is the actual behavior?
The inputs and controls of RMWC(TextField, Checkbox, Select, Radio...) currently have no "name" attribute.
Any other information you believe would be useful?
However, I am able to use some tricks to achieve this in TypeScript.
Here's how I do it:
(TS part)
(HTML Part)
Is it possible to add "name" attribute on the inputs and controls of RMWC?
That would be a more proper way to handle changes of inputs and controls.
The text was updated successfully, but these errors were encountered: