Skip to content

Commit 9ea8f59

Browse files
author
Escalion
authored
Add support for step min and max props
Textfield was not passing the step min and max props to the assosciated <Input> resulting in no availability of base HTML5 functions.
1 parent c10ba13 commit 9ea8f59

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/textfield/Textfield.svelte

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
<Input
3636
{type}
3737
{disabled}
38+
{step}
39+
{min}
40+
{max}
3841
bind:value
3942
bind:files
4043
bind:dirty
@@ -124,8 +127,11 @@
124127
export let invalid = uninitializedValue;
125128
export let updateInvalid = invalid === uninitializedValue;
126129
export let useNativeValidation = updateInvalid;
130+
export let step = null;
131+
export let min = null;
132+
export let max = null;
127133
128-
$: props = exclude($$props, ['use', 'class', 'ripple', 'disabled', 'fullwidth', 'textarea', 'variant', 'dense', 'withLeadingIcon', 'withTrailingIcon', 'noLabel', 'label', 'type', 'value', 'dirty', 'invalid', 'updateInvalid', 'useNativeValidation', 'input$', 'label$', 'ripple$', 'outline$']);
134+
$: props = exclude($$props, ['use', 'class', 'ripple', 'disabled', 'fullwidth', 'textarea', 'variant', 'dense', 'withLeadingIcon', 'withTrailingIcon', 'noLabel', 'label', 'type', 'value', 'dirty', 'invalid', 'updateInvalid', 'useNativeValidation', 'input$', 'label$', 'ripple$', 'outline$', 'step', 'min', 'max']);
129135
130136
let element;
131137
let textField;
@@ -181,4 +187,4 @@
181187
export function layout(...args) {
182188
return textField.layout(...args);
183189
}
184-
</script>
190+
</script>

0 commit comments

Comments
 (0)