<ImageField> breaks form when used as last form field
Hi,
Just run into a problem using ImageField as last field in a form, this breaks the form display due to the float: left on the component.
export const StorageFileEdit = (props) => (
<Edit title={<StorageFileTitle />} {...props}>
<SimpleForm validation={createValidation(validationSchema)}>
<DisabledInput source='id' />
<TextInput source='name' />
<ImageField source='url' />
</SimpleForm>
</Edit>
)

Using a fields (TextField e.g.) after the ImageField one or using artifice like the code above solve the problem.
export const StorageFileEdit = (props) => (
<Edit title={<StorageFileTitle />} {...props}>
<SimpleForm validation={createValidation(validationSchema)}>
<DisabledInput source='id' />
<TextInput source='name' />
<BlockImageField />
</SimpleForm>
</Edit>
)
const BlockImageField = (props) => (
<div style={{ display: 'inline-block' }}>
<ImageField {...props} source='url' />
</div>
)
But I'am asking if the float: left attributes is still necessary, or if so, if there is a better way to display the ImageField whitout breaking the form.
Thanks !
Good catch! I think a clear: both; in an .image-input::after element would solve the issue. I'll take a look on it later, unless you are volunteer to give it a try? :)
I'll do it 👍
Can't reproduce the problem anymore.