I used the app SDK quickstart to make an app. Up until an hour ago, it was working. Then the file input stopped working. I haven’t touched this part of the code (to my knowledge) and the file select input event handler is not triggering at all.
I have the following code:
app.js
document.getElementById('csvFileInput').addEventListener('change', handleFileSelect, false);
function handleFileSelect(event) {
console.log('file');
const file = event.target.filesl0];
if (file) {
const reader = new FileReader();
reader.onload = function(e) {
const contents = e.target.result;
const rowsArr = processCSV(contents);
buildGraph(rowsArr);
};
}
}
...
app.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://miro.com/app/static/sdk/v2/miro.js"></script>
<title>My App</title>
</head>
<body>
<div id="root">
<div class="grid wrapper">
<div class="cs1 ce12">
<input type="file" id="csvFileInput" />
</div>
</div>
</div>
<script src="/src/app.js"></script>
</body>
</html>
Please help!