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