在 TextInput 更改时更新 ImageField

Update ImageField on change of TextInput

给定一个 SimpleForm:

<SimpleForm>
    <TextInput source="imageUrl" label="Image URL" />
    <ImageField source="imageUrl" label="Image" />
</SimpleForm>

我希望在用户输入 TextInput 时更新 ImageField。这是开箱即用的,还是我必须自己连接?

您可能应该构建一个自定义输入,就像我们为图片上传构建的那样。而不是文件输入,只需使用文本输入并处理其中的图像可视化。