You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
create a form variable with useForm passing in PreferencesFormFields for the type parameter, and set default initial values.
use {...form.getInputProps('username', { withError: false })} to connect each input field up to the form hook (replace with correct property name instead of 'username')
wrap the form fields in a <form></form> element and set the onSubmit property of the form element to just console.log the values
The text was updated successfully, but these errors were encountered:
ok I worked on the Preferences card a bit. I've figured out how to combine React Query with the useForm from mantine
just for that specific form
it's a little overkill otherwise I think but in this case after you click "Save" we want to refetch the data and then always have the form open instead of how you'd traditionally submit the form then close the form or modal, or navigate away
which we can do with the invalidate of React Query
So, that's nice. Took a while but we got there
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
UI
Form
Follow the patterns in
components/LoginForm
form
variable withuseForm
passing in PreferencesFormFields for the type parameter, and set default initial values.{...form.getInputProps('username', { withError: false })}
to connect each input field up to the form hook (replace with correct property name instead of 'username')<form></form>
element and set theonSubmit
property of theform
element to justconsole.log
the valuesThe text was updated successfully, but these errors were encountered: