JSFiddle - React, Tailwind, and code Playground
HTML
<div id="dvImportSegments" class="fileupload ">
<fieldset>
<legend>Upload your CSV File</legend>
<input type="file" name="File Upload" id="csv_file_upload" accept=".csv" onclick="run();" />
</fieldset>
</div>
<div id="data-display"></div>
JavaScript
function run() {
console.log('run();');
//document.getElementById('csv_file_upload').addEventListener('change', read_csv, false);
document.getElementById('csv_file_upload').addEventListener('change', function() {
console.log("reading file..");
}, false);
$('#csv_file_upload').click(function() {
$(this).val("");
console.log('reload();');
});
}