ValentinnDimitroff / ra-compact-ui

Enhanced components for popular framework react-admin. Helps reducing the styling boilerplate code and eases layout customizations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CompactForm throws error in production when child is a function

CleverAtBen opened this issue · comments

I have the following piece of code, aligned to a material ui stepper which works perfectly in Development.

                <CompactForm layoutComponents={[RaBox]} toolbar={buttons()} {...props}>
                    <FormDataConsumer>
                        {({ formData, ...rest }) => getStepContent(activeStep, formData)}
                    </FormDataConsumer>
                </CompactForm>

However when I move it to production I get an error thrown in CompactFormView at this point variant={x.props.variant || variant} because x.props isnt a thing for the child function.