suid
suid copied to clipboard
TextField multiline property not working
Using TextField multiline property is not working. Checking the DOM it seems tag has not been replaced by a
There's workaround, you can replace it through InputProps { inputComponent: 'textarea' }
This workaround doesn't work with suid/material 0.9.1and raises an error (TypeError: Cannot set property type of #<HTMLTextAreaElement> which has only a getter) at InputBase.jsx:310.
Commenting lines 309 to 315 fixes this error but will probably have side effects !
In fact the issue is that HTMLTextAreaElement has a type property (with "textarea" has a value) and this type property is read only while HTMLInputElement has a read/write type property.
A better patch is to leave these lines as they are and add the value "textarea" to the selectionTypes set (line 241):
const selectionTypes = new Set(["text", "textarea", "search", "password", "tel", "url"]);
This is done guys (demo available at https://next.suid.io/components/text-field).
I will publish the new release in the next few days.
Closed via https://github.com/swordev/suid/commit/5a017a08d80e3638fff3fab41cf7f524543b067c.