-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workingfeatureNew feature or requestNew feature or request
Description
Describe the bug
When we use FormProxyProvider with useMappingProxy, the error for proxied path root can not be set. This happens because proxy tries to construct an object from mappings that were provided in ProxyMapSource, but it is impossible to construct an error for whole proxied object.
To Reproduce
https://codesandbox.io/s/reactive-forms-proxy-test-gtcqi2?file=/src/App.tsx
Expected behavior
Possible solution:
Create hook useFieldProxy with the same arguments as in useMappingProxy, but store whole object error internally in useRef. However, this approach has disadvantages, as we can not access that error from real values tree.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfeatureNew feature or requestNew feature or request