frontend
frontend copied to clipboard
Add user prompts two file select window
Behaviour as described in the title.
Reason: not investigated.
Just confirming: this is not resolved.
Took a stab at the investigation, would be working on a PR soon.
Both <CSVReader>
and <FileInput>
components spawn a window when clicked.
The first window, spawned by <CSVReader>
asks for a csv file. The second window, spawned by <FileInput>
, accepts any kind of file. We should only be uploading the csv file to the first window since it will then be passed around by <CSVReader>
into the validateCsvInput
function.
<CSVReader
onUploadAccepted={(results: any) => validateCsvInput(results)}
config={{
delimiter: ',',
skipEmptyLines: true
}}
>
{({ getRootProps, acceptedFile, ProgressBar, getRemoveFileProps }: any) => (
<>
<FileInput text="Upload CSV" inputProps={getRootProps()} />
<>
)