svelte-ux
svelte-ux copied to clipboard
TextField with multiline doesn't get inputEl set
In TextField, only the Input element has bind:inputEl. If it is a multiline TextField, inputEl will always be null. Unless there are considerations on the differences between textarea and Input that I am not aware of, adding bind:this={inputEl} to the textarea seems to work.
Hey @erlenddahl 👋. That's a good call out and should be fine to add bind:this{inputEl} to <textarea> and update the inputEl type to include HTMLTextAreaElement. Adding this additional type would require some conditional handling in some cases for property type handling, but nothing unexpected.
I would like to move more of the type handling from TextField to Input over time (see: https://github.com/techniq/svelte-ux/issues/225).