-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the problem
Currently we can use inpút type number to bind to decimal numbers but browser support is inconsistent regarding different locales and decimal separators.
Describe the proposed solution
It would be nice to be able to customize the binding process using custom binding handlers as shown below:
<input type="text" bind|commaSeparatedDecimal:value={someDecimalNumber} />
The (two way) binding handler should be able to check the element kind (html input, svelte component, etc), attach event handlers to limit allowed characters and provide formatting as well.
This could be useful in many other scenarios:
<input type="text" bind|commaSeparatedTags:value={tagsArray} />
Alternatives considered
I thing the current alternative is to use a different property for the binding, but I might be wrong.
Importance
would make my life easier