Skip to content

Commit 8a7fe80

Browse files
author
Larry Botha
committed
feat(form component): expose all methods via slot props
1 parent 682a7e6 commit 8a7fe80

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/components/Form.svelte

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
handleChange,
1717
handleSubmit,
1818
updateField,
19+
updateInitialValues,
1920
updateTouched,
21+
updateValidateField,
22+
validateField,
2023
} = createForm({
2124
initialValues,
2225
validationSchema,
@@ -32,7 +35,10 @@
3235
handleChange,
3336
handleSubmit,
3437
updateField,
38+
updateInitialValues,
3539
updateTouched,
40+
updateValidateField,
41+
validateField,
3642
});
3743
</script>
3844

@@ -45,6 +51,9 @@
4551
{handleChange}
4652
{handleSubmit}
4753
{updateField}
54+
{updateInitialValues}
4855
{updateTouched}
56+
{updateValidateField}
57+
{validateField}
4958
/>
5059
</form>

0 commit comments

Comments
 (0)