|
|
|
@ -552,18 +552,17 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
|
updateDirList (keycode = 'none') { |
|
|
|
|
const presentOptions = this.uiPathList.querySelectorAll('option') |
|
|
|
|
// Initial load
|
|
|
|
|
if (keycode === 'none' ) { |
|
|
|
|
for (var o of presentOptions) o.remove() |
|
|
|
|
if (keycode === 'none') { |
|
|
|
|
for (const o of presentOptions) o.remove() |
|
|
|
|
this.testTabLogic.dirList('/').then((options) => { |
|
|
|
|
options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`)) |
|
|
|
|
}) |
|
|
|
|
} else if (this.inputPath.value && this.inputPath.value.endsWith('/')) { |
|
|
|
|
for (var o of presentOptions) o.remove() |
|
|
|
|
for (const o of presentOptions) o.remove() |
|
|
|
|
this.testTabLogic.dirList(this.inputPath.value).then((options) => { |
|
|
|
|
options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`)) |
|
|
|
|
}) |
|
|
|
|
}
|
|
|
|
|
else { |
|
|
|
|
} else { |
|
|
|
|
let matchFound = false |
|
|
|
|
for (var option of presentOptions) { |
|
|
|
|
if (option.innerHTML.startsWith(this.inputPath.value)) matchFound = true |
|
|
|
|