File Input errors handling on drop #12
Replies: 0 comments 13 replies
-
Since the parent passes the constraints to be respected by some properties like |
Beta Was this translation helpful? Give feedback.
-
@fredericvilcot Please align vocabulary, because in the ticket #300 we talk about "File Input Component" and "DragAndDrop component", and here we talk about "FileUpload", so I'm a little bit confused about the scope and responsibility of the component we are talking about here. |
Beta Was this translation helpful? Give feedback.
-
@fredericvilcot what did you have in mind concerning the type |
Beta Was this translation helpful? Give feedback.
-
After discusssion with @fredericvilcot @lolottetheclash and @ccamel, we decided the component remain a dumb component. |
Beta Was this translation helpful? Give feedback.
-
Thanks all for your contribution, I lock this discussion |
Beta Was this translation helpful? Give feedback.
-
The implementation of the
FileInput
component has been launched, following specification declared in issue okp4/ui#300.This discussion is opened in order to decide on the interest of an additional property of this component.
💡Idea
When the user adds one or more files using the drag and drop mechanism, it is possible that the deposited elements do not respect certain integrity rules declared in advance, such as the total size of an upload, the bad file format etc.
🚀 Solution
To allow the component to freely manage this error, we can imagine some solutions:
onError
property which will be a callback method called in the event of an error when dropping elements. This allows the parent to be warned about an eventual error state and thus react (or not) to propagate this error.Pros / Cons:
FileInput
component, the parent has no control over it.Pros / Cons:
Please, share your ideas about that, do not hesitate to add some propositions! 🙏
Beta Was this translation helpful? Give feedback.
All reactions