GraphQLBridge getProps fieldProps #1288
Unanswered
simplecommerce
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I noticed that in the latest version of the bridge v3.10.2, the
fieldProps
argument was removed from thegetProps
method of the bridge.I was wondering what was the reasoning behind removing it.
I was depending on that specific
fieldProps
argument being passed for dynamic properties on a field.For example, if I click a checkbox, it sets
required
to a field that wasn't required in my schema but should be based on a selection that change.I don't expect it to be put back but I was wondering, if I can't depend on this argument anymore, how do I get the current
fieldProps
from my custom method inside the bridge?Or is there a helper option to get the current
fieldProps
by name?For example, if my field name is
other
, could I do something like:formRef.current.getFieldProps("other")
or something like that?Any help is appreciated, thanks!
UPDATE: ok so I was able to figure out another similar way of doing it by using the
extras
but creating a method that allows me to update theextras
from outside, this way it seems to work, I will continue testing on my end.UPDATE2 ok so it didn't work as I believe, because on render
extras
is empty and if I update it via my method, it doesn't seem to see the new props in my validation method as it only sees the old extras that is undefined, I need to keep playing with it to see if I can make it work or not.Beta Was this translation helpful? Give feedback.
All reactions