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
The useForm hook passes queryOptions to useOne like this:
enabled: !isCreate && id !== undefined,
...props.queryOptions,
This results in the internal enabled condition (!isCreate && id !== undefined) being overridden if the user passes a custom enabled flag through queryOptions.
As a result, if the custom enabled is set to true but id is still undefined, the hook proceeds to make an API call with an invalid or missing ID — leading to unintended behavior, Or atleast doesnt look obvious behaviour.
Steps To Reproduce
pass enabled to useForm like this
useForm({queryOptions: {enabled: <mycondition>}})
Expected behavior
I would expect that it performs ANDing of my condition and the existing condition, since no one would never expect it to take id as undefined.