svelteuidev / svelteui

SvelteUI Monorepo
https://svelteui.dev
MIT License
1.29k stars 64 forks source link

[@svelteui/core] support types other than 'text' in `Input` #292

Closed BeeMargarida closed 1 year ago

BeeMargarida commented 1 year ago

Originated from https://discord.com/channels/954790377754337280/1069668539658682409

Input only supported type=text, which should not be since this is a component that should mirror the behaviour of the <input> DOM element. Since it's not possible to do two-way binding of value when changing the type of the input (see links below), the on:input binding had to do this manually.

https://stackoverflow.com/questions/57392773/error-type-attribute-cannot-be-dynamic-if-input-uses-two-way-binding https://github.com/sveltejs/svelte/issues/3921

Before submitting the PR, please make sure you do the following

Tests