'onDrop' does not fire in <ImageInput> options (react-admin 3.0.1)
See original GitHub issueWhat you were expecting: ‘onDrop’ fires in <ImageInput> options
What happened instead: ‘onDrop’ does not fire in <ImageInput> options
Steps to reproduce: Define a function called ‘callback’ Add ‘options={{onDrop:callback}}’ in <ImageInput>
Related code:
const callback = () => { console.log("callback"); }
<ImageInput source="pictures" label="Related pictures" accept="image/*" options={{onDrop:callback}}>
<ImageField source="src" title="title" />
</ImageInput>
Environment
- React-admin version: 3.0.1
- React version: 16.9.0
- Browser: Chrome Version 78.0.3904.97 (Official Build) (64-bit)
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
how to pass onDrop callback to ImageInput - reactjs
I am trying to pass a callback so I can use ImageInput to save the files/images before the form is ...
Read more >The ImageInput Component - React-admin - Marmelab
Prop Required Type Default
accept Optional string | string ‑
children Optional ReactNode ‑
minSize Optional number 0
Read more >Research Artefact: A Large-Scale Study of React-Related ...
Id PostTypeId AcceptedAnswerId OwnerUserId AnswerCount CommentCount Fa...
27279488 1 29040342 674474 3 5 0
29314839 1 29437736 2802074 2 2 3
30459180 1 30459458 745952 1...
Read more >react-admin: Versions - Openbase
Full version history for react-admin including change logs.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Sorry, that’s not an option, you can pass it as a prop directly
https://codesandbox.io/s/simple-2qzpd?fontsize=14&hidenavigation=1&theme=dark src->posts->PostEdit.js
<ImageInput>