Hi, I really like Uppy and would like to use custom fields in the metadata editing UI in the Dashboard plugin.
For example, I want to add a maps field so that user can select a location.
Thanks for the help.
There's no way to do this right now; there was a similar issue about checkboxes earlier: https://github.com/transloadit/uppy/issues/454
I think having some way of adding arbitrary elements as fields would be best, so we don't have to maintain all possible kinds of field types in Uppy itself. Not sure what a good API would be. Maybe extending the metaFields option with a render method?
uppy.use(Dashboard, {
metaFields: [
{
id: 'location',
name: 'Location',
render() { return <Map /> })
}
]
})
I think another way can be having the ability to bind a function to the image edit button. That way, we can show the form or even open a modal. And with the fileID passed from Uppy, it can set the meta for that file using existing Uppy API.
There鈥檚 also a request for meta validation by @milanpatel-parkstreet :
MetaData Field set validation as required or enter only numeric value etc.
My reply:
This is a good idea, but requires a bit complex solution, I鈥檓 afraid. We鈥檇 need to allow for custom validation functions for each field.
Right now we have requests for boolean options, selects, and even custom thing like map #617 #454. Still trying to think how this could all better work together.
Hey there, we really like the idea of allowing custom form fields in meta editing in the dashboard via jsx rendering. We've added this idea to our backlog and will hence close this issue until we get a chance to work on it (then we'll re-open). Of course, if someone in the community wants to offer a PR, we'd be very happy!
Most helpful comment
There's no way to do this right now; there was a similar issue about checkboxes earlier: https://github.com/transloadit/uppy/issues/454
I think having some way of adding arbitrary elements as fields would be best, so we don't have to maintain all possible kinds of field types in Uppy itself. Not sure what a good API would be. Maybe extending the
metaFieldsoption with arendermethod?