svelte-ux icon indicating copy to clipboard operation
svelte-ux copied to clipboard

TextField with multiline doesn't get inputEl set

Open erlenddahl opened this issue 1 year ago • 1 comments

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.

erlenddahl avatar May 21 '24 12:05 erlenddahl

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).

techniq avatar May 21 '24 20:05 techniq