fix issues with file input

This commit is contained in:
Felix Hamann 2019-06-03 16:47:00 +02:00
parent 9e2aa1da80
commit 60c3dac8aa

View File

@ -41,8 +41,8 @@ export class FileInput {
// add change listener
this._element.addEventListener('change', () => {
this.updateLabel();
this.renderFileList();
this._updateLabel();
this._renderFileList();
});
// add util class for styling and mark as initialized
@ -64,7 +64,7 @@ export class FileInput {
Array.from(files).forEach((file) => {
const fileDisplayEl = document.createElement('li');
fileDisplayEl.innerHTML = file.name;
this.fileList.appendChild(fileDisplayEl);
this._fileList.appendChild(fileDisplayEl);
});
}