clear dropdown list item

pull/262/head
yann300 5 years ago
parent 20caecd2cb
commit b71b1f05c9
  1. 14
      src/app/tabs/test-tab.js

@ -485,10 +485,11 @@ module.exports = class TestTab extends ViewPlugin {
return yo`<span class='text-info h6'>Progress: ${ready} finished (of ${this.runningTestsNumber})</span>` return yo`<span class='text-info h6'>Progress: ${ready} finished (of ${this.runningTestsNumber})</span>`
} }
updateDirList (e) { updateDirList () {
if (e.keyCode === 191) {
for (var o of this.uiPathList.querySelectorAll('option')) o.remove() 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`<option>browser</option>`)
if (this.testTabLogic.isRemixDActive()) this.uiPathList.appendChild(yo`<option>localhost</option>`)
if (!this._view.el) return
options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`)) options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`))
}) })
} }
@ -510,13 +511,12 @@ module.exports = class TestTab extends ViewPlugin {
data-id="uiPathInput" data-id="uiPathInput"
name="utPath" name="utPath"
style="background-image: var(--primary);" style="background-image: var(--primary);"
onkeydown=${(e) => this.updateDirList(e)} onkeydown=${(e) => { if (e.keyCode === 191) this.updateDirList() }}
onchange=${(e) => this.updateCurrentPath(e)}/> onchange=${(e) => this.updateCurrentPath(e)}/>`
${this.uiPathList} ${this.uiPathList}
</div> </div>
` `
this.uiPathList.appendChild(yo`<option>browser</option>`) this.updateDirList()
if (this.testTabLogic.isRemixDActive()) this.uiPathList.appendChild(yo`<option>localhost</option>`)
this.testsExecutionStopped.hidden = true this.testsExecutionStopped.hidden = true
this.testsExecutionStoppedError.hidden = true this.testsExecutionStoppedError.hidden = true
this.resultStatistics = this.createResultLabel() this.resultStatistics = this.createResultLabel()

Loading…
Cancel
Save