fix(ui): add input el for workflow upload button

Need this to select the file
This commit is contained in:
psychedelicious 2024-02-13 13:15:48 +11:00
parent 3ecb1e580f
commit 1d9801e7be

View File

@ -22,13 +22,14 @@ const UploadWorkflowButton = () => {
[loadWorkflowFromFile] [loadWorkflowFromFile]
); );
const { getRootProps } = useDropzone({ const { getInputProps, getRootProps } = useDropzone({
accept: { 'application/json': ['.json'] }, accept: { 'application/json': ['.json'] },
onDropAccepted, onDropAccepted,
noDrag: true, noDrag: true,
multiple: false, multiple: false,
}); });
return ( return (
<>
<Button <Button
aria-label={t('workflows.uploadWorkflow')} aria-label={t('workflows.uploadWorkflow')}
tooltip={t('workflows.uploadWorkflow')} tooltip={t('workflows.uploadWorkflow')}
@ -38,6 +39,8 @@ const UploadWorkflowButton = () => {
> >
{t('workflows.uploadWorkflow')} {t('workflows.uploadWorkflow')}
</Button> </Button>
<input {...getInputProps()} />
</>
); );
}; };