We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5ed56f commit c922c70Copy full SHA for c922c70
packages/svelte-ux/src/lib/components/Input.svelte
@@ -40,6 +40,10 @@
40
$: firstPlaceholderPos = [...(mask ?? '')].findIndex((c) => replaceSet.has(c));
41
$: acceptRegEx = accept instanceof RegExp ? accept : new RegExp(accept, 'g');
42
43
+ function typeAction(node: HTMLInputElement) {
44
+ node.type = type;
45
+ }
46
+
47
function clean(inputValue: string) {
48
// Get only accepted characters (no mask)
49
const inputMatch = inputValue?.match(acceptRegEx) || [];
@@ -93,7 +97,7 @@
93
97
<input
94
98
{id}
95
99
{value}
96
- {type}
100
+ use:typeAction
101
{inputmode}
102
placeholder={isFocused && mask ? mask : placeholder}
103
{disabled}
0 commit comments