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
When using the composition API on vee, for primitive types (useField) the function itself returns some useful state refs like errorBag, meta, etc... So you can use them to check for errors and manage how to display it on screen.
But when dealing with arrays (useFieldArray), it does'nt return anything about the state of this field and it's metadata...
Is there a way to get the metadata or error bag of this specific field?
I know that useForm returns the errorBag with everything, but the problem is, the component that is using useFieldArray is way too many levels down the line where i'm calling useForm, so passing it would not be great, and also if possible, I don't want to handle provide/injection for this case.
update: Unfortunaly did find anything, and I ended up passing the error bag down the component hierarchy
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When using the composition API on vee, for primitive types (
useField
) the function itself returns some useful state refs likeerrorBag
,meta
, etc... So you can use them to check for errors and manage how to display it on screen.But when dealing with arrays (
useFieldArray
), it does'nt return anything about the state of this field and it's metadata...Is there a way to get the metadata or error bag of this specific field?
I know that
useForm
returns the errorBag with everything, but the problem is, the component that is usinguseFieldArray
is way too many levels down the line where i'm callinguseForm
, so passing it would not be great, and also if possible, I don't want to handle provide/injection for this case.update: Unfortunaly did find anything, and I ended up passing the error bag down the component hierarchy
Beta Was this translation helpful? Give feedback.
All reactions