What you were expecting:
I would like to apply 'fullWidth' on the label in show view.
What happened instead:
My label have a min width and my component take it.
Steps to reproduce:
field.field.defaultProps = {
addLabel: true,
fullWidth: true
};
export const YamlField = ({ source, record = {} }) => (
<AceEditor
width="100%"
mode="yaml"
theme="monokai"
showPrintMargin={false}
showGutter={true}
highlightActiveLine={true}
setOptions={{
showLineNumbers: true,
tabSize: 2
}}
editorProps={{ $blockScrolling: Infinity }}
value={record[source]}
readOnly={true}
/>
);
Environment
Then don't use addLabel but decorate your component with the <Labeled> component, or better, use material-ui's FormControl and InputLabel directly.