-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
Provide a general summary of the feature here
I'm building a form that includes a few sections that require file uploads. It would be nice if I could use the existing form API to handle this scenario. I found this discussion that covers this topic — has there been any progress made since then? If not, and if there's still interest in implementing this, I'm happy to give it a go.
🤔 Expected Behavior?
<Form validationErrors={errors} onSubmit={onSubmit}>
<TextField name="name">
<Label>Name</Label>
<Input />
<FieldError />
</TextField>
<FormField name="files">
<Label>Files</Label>
<Input />
<FieldError />
</FormField>
<Button type="submit">Add</Button>
</Form>😯 Current Behavior
The FileTrigger component is currently not composable with the Form component.
💁 Possible Solution
My current best guess is that this would involve:
- creating a
FormFieldcomponent analagous toTextFieldandNumberField - extending the
Inputcomponent to be composable withFormField
I'm unsure how to tackle 2. as the current implementation of file upload in FileTrigger doesn't just use <input type="file" />. Would appreciate any input on this problem!
🔦 Context
n/a
💻 Examples
No response
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
Ty3uK, rvanlaarhoven, cypherfunc and wand3r
Metadata
Metadata
Assignees
Labels
No labels