Skip to content

Commit

Permalink
feat(form component): expose all methods via slot props
Browse files Browse the repository at this point in the history
  • Loading branch information
larrybotha committed Feb 25, 2021
1 parent 682a7e6 commit 8a7fe80
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/components/Form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
handleChange,
handleSubmit,
updateField,
updateInitialValues,
updateTouched,
updateValidateField,
validateField,
} = createForm({
initialValues,
validationSchema,
Expand All @@ -32,7 +35,10 @@
handleChange,
handleSubmit,
updateField,
updateInitialValues,
updateTouched,
updateValidateField,
validateField,
});
</script>

Expand All @@ -45,6 +51,9 @@
{handleChange}
{handleSubmit}
{updateField}
{updateInitialValues}
{updateTouched}
{updateValidateField}
{validateField}
/>
</form>

0 comments on commit 8a7fe80

Please sign in to comment.