Custom props for connectField not working when set via JSONSchema #1263
-
I have a custom component created using connectField. I pass custom props to this component. The custom props are always undefined when passing them as part of JSONSchema. However the same works when the component is used via AutoField. Not Working Code:- export type EmployeeFieldProps = { function Employee({ employeeType, employeeAge }: EmployeeFieldProps) { export const DemoJsonSchema = () => {
}` Working Code:- export type EmployeeFieldProps = { function Employee({ employeeType, employeeAge }: EmployeeFieldProps) { export const DemoAutoField = () => {
}` Packages being used:- We expect customization to be possible via the Schema. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @shashank-452! I just checked that and it works as expected, i.e., these props are available there. Are you sure you're rendering the result of (Side note: please try formatting your code using code blocks, i.e., ```.) |
Beta Was this translation helpful? Give feedback.
Hi @shashank-452! I just checked that and it works as expected, i.e., these props are available there. Are you sure you're rendering the result of
connectField(Employee)
and notEmployee
? That's what your code suggests.(Side note: please try formatting your code using code blocks, i.e., ```.)