Closed aturan23 closed 5 years ago
FYI, render
accepts a function which receives the control as a parameter.
You can use it like this
const fieldConfig = {
controls: {
autosuggestion: {
render: (control) => <AutocomplateField {...control} />,
meta : {
label: "some"
}
}
}
}
FYI,
render
accepts a function which receives the control as a parameter. You can use it like thisconst fieldConfig = { controls: { autosuggestion: { render: (control) => <AutocomplateField {...control} />, meta : { label: "some" } } } }
Thank you to your advice! @bietkul. Bit more question. When I use separate fields it's render just first one:
controls: {
autosuggestion: {
render: (control) => <AutocomplateField {...control} />,
meta : {
label: "some"
}
},
downshift: {
render: (control) => <IntegrationDownshift {...control}/>,
meta: {
label: 'downshift'
}
}
}
#
Describe the bug When I use FormGenerator with a material-ui react-autosuggest, an error occurs.
To Reproduce Steps to reproduce the behavior:
export { default as AutocomplateField } from './AutocomplateField';
import {AutocomplateField } from 'app/field-components';
<FormGenerator fieldConfig={fieldConfig} />
Desktop (please complete the following information):
Error context