Update ImageField on change of TextInput

2019-08-02 08:47发布

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条回答
爷、活的狠高调
2楼-- · 2019-08-02 09:14

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.

查看更多
登录 后发表回答