save ref to input

uiCheck
yann300 4 years ago
parent b71b1f05c9
commit 9d42433356
  1. 30
      src/app/tabs/test-tab.js

@ -486,13 +486,13 @@ module.exports = class TestTab extends ViewPlugin {
} }
updateDirList () { updateDirList () {
for (var o of this.uiPathList.querySelectorAll('option')) o.remove() for (var o of this.uiPathList.querySelectorAll('option')) o.remove()
this.uiPathList.appendChild(yo`<option>browser</option>`) this.uiPathList.appendChild(yo`<option>browser</option>`)
if (this.testTabLogic.isRemixDActive()) this.uiPathList.appendChild(yo`<option>localhost</option>`) if (this.testTabLogic.isRemixDActive()) this.uiPathList.appendChild(yo`<option>localhost</option>`)
if (!this._view.el) return if (!this._view.el) return
options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`)) this.testTabLogic.dirList(this.inputPath.value).then((options) => {
}) options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`))
} })
} }
render () { render () {
@ -501,18 +501,20 @@ module.exports = class TestTab extends ViewPlugin {
this.testsExecutionStopped = yo`<label class="text-warning h6" data-id="testTabTestsExecutionStopped">The test execution has been stopped</label>` this.testsExecutionStopped = yo`<label class="text-warning h6" data-id="testTabTestsExecutionStopped">The test execution has been stopped</label>`
this.testsExecutionStoppedError = yo`<label class="text-danger h6" data-id="testTabTestsExecutionStoppedError">The test execution has been stopped because of error(s) in your test file</label>` this.testsExecutionStoppedError = yo`<label class="text-danger h6" data-id="testTabTestsExecutionStoppedError">The test execution has been stopped because of error(s) in your test file</label>`
this.uiPathList = yo`<datalist id="utPathList"></datalist>` this.uiPathList = yo`<datalist id="utPathList"></datalist>`
const availablePaths = yo` this.inputPath = yo`<input
<div> placeholder=${this.defaultPath}
<input list="utPathList"
placeholder=${this.defaultPath} class="custom-select"
list="utPathList" id="utPath"
class="custom-select" data-id="uiPathInput"
id="utPath" name="utPath"
data-id="uiPathInput" style="background-image: var(--primary);"
name="utPath"
style="background-image: var(--primary);"
onkeydown=${(e) => { if (e.keyCode === 191) this.updateDirList() }} onkeydown=${(e) => { if (e.keyCode === 191) this.updateDirList() }}
onchange=${(e) => this.updateCurrentPath(e)}/>` onchange=${(e) => this.updateCurrentPath(e)}/>`
const availablePaths = yo`
<div>
${this.inputPath}
${this.uiPathList} ${this.uiPathList}
</div> </div>
` `

Loading…
Cancel
Save