You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I experienced this problem and I can add that <FileInput> uses the source props of its children to create the file which is passed as a record to its children :
What you were expecting:
Using ImageInput with a custom preview component works:
What happened instead:
The preview doesn't work. To make it work, one has to pass the props explicitly in the preview component:
This may be natural in 3.0, but in 4.0 this is unexpected.
Related code:
The culprit is
<FileInput>
, which still clones its child instead of wrapping it in aRecordContext
:react-admin/packages/ra-ui-materialui/src/input/FileInput.tsx
Lines 189 to 205 in 8287a60
Environment
The text was updated successfully, but these errors were encountered: