问题
Given a SimpleForm
:
<SimpleForm>
<TextInput source="imageUrl" label="Image URL" />
<ImageField source="imageUrl" label="Image" />
</SimpleForm>
I'd like to have the ImageField
update as the user types in the TextInput
. Is this somehow possible out of the box, or will I have to wire it up myself?
回答1:
You should probably build a custom input like the one we built for image upload. Instead of the file input, just use a text input and handle the image visualization inside it.
来源:https://stackoverflow.com/questions/47439028/update-imagefield-on-change-of-textinput