From b71b1f05c9becb72049df6e3eb1f195c69979bd0 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 2 Jul 2020 12:55:08 +0200 Subject: [PATCH] clear dropdown list item --- src/app/tabs/test-tab.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index ef3857c993..50242d07bb 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -485,10 +485,11 @@ module.exports = class TestTab extends ViewPlugin { return yo`Progress: ${ready} finished (of ${this.runningTestsNumber})` } - updateDirList (e) { - if (e.keyCode === 191) { + updateDirList () { for (var o of this.uiPathList.querySelectorAll('option')) o.remove() - this.testTabLogic.dirList(this._view.el.getElementsByClassName('custom-select')[0].value).then((options) => { + this.uiPathList.appendChild(yo``) + if (this.testTabLogic.isRemixDActive()) this.uiPathList.appendChild(yo``) + if (!this._view.el) return options.forEach((path) => this.uiPathList.appendChild(yo``)) }) } @@ -510,13 +511,12 @@ module.exports = class TestTab extends ViewPlugin { data-id="uiPathInput" name="utPath" style="background-image: var(--primary);" - onkeydown=${(e) => this.updateDirList(e)} - onchange=${(e) => this.updateCurrentPath(e)}/> + onkeydown=${(e) => { if (e.keyCode === 191) this.updateDirList() }} + onchange=${(e) => this.updateCurrentPath(e)}/>` ${this.uiPathList} ` - this.uiPathList.appendChild(yo``) - if (this.testTabLogic.isRemixDActive()) this.uiPathList.appendChild(yo``) + this.updateDirList() this.testsExecutionStopped.hidden = true this.testsExecutionStoppedError.hidden = true this.resultStatistics = this.createResultLabel()