save ref to input

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

@ -490,10 +490,10 @@ module.exports = class TestTab extends ViewPlugin {
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
this.testTabLogic.dirList(this.inputPath.value).then((options) => {
options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`)) options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`))
}) })
} }
}
render () { render () {
this.onActivationInternal() this.onActivationInternal()
@ -501,9 +501,7 @@ 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>
<input
placeholder=${this.defaultPath} placeholder=${this.defaultPath}
list="utPathList" list="utPathList"
class="custom-select" class="custom-select"
@ -513,6 +511,10 @@ module.exports = class TestTab extends ViewPlugin {
style="background-image: var(--primary);" 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