-
In my app, I'm trying to display an original/edited diff above each form field. An edited field will be marked in some way and show its original value above it on hover or something like that. I can set this up without much trouble in userland, but it'd be much simpler if something like Maybe I'm missing something obvious. The library certainly stores default values in order to populate flags like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Turns out I was indeed missing something very obvious: const field = useFieldContext<string>();
console.log({
defaultValue: field.form.options.defaultValues?.[field.name],
currentValue: field.state.value,
}); |
Beta Was this translation helpful? Give feedback.
Turns out I was indeed missing something very obvious: