added selected attribute for evmVersionSelector

pull/646/head
aniket-engg 4 years ago committed by Aniket
parent e428434638
commit 07a66d74cf
  1. 12
      apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js

@ -230,8 +230,11 @@ class CompilerContainer {
</select>`
if (this.compileTabLogic.evmVersion) {
const s = this._view.evmVersionSelector
console.log('s=====>', s)
let i
for (i = 0; i < s.options.length; i++) {
console.log('options value', s.options[i].value)
console.log('this.compileTabLogic.evmVersion', this.compileTabLogic.evmVersion)
if (s.options[i].value === this.compileTabLogic.evmVersion) {
break
}
@ -241,6 +244,7 @@ class CompilerContainer {
this.onchangeEvmVersion()
} else {
s.selectedIndex = i
this.onchangeEvmVersion()
}
}
@ -370,6 +374,14 @@ class CompilerContainer {
v = null
}
this.compileTabLogic.setEvmVersion(v)
for (let i = 0; i < s.options.length; i++) {
if (i === s.selectedIndex) {
s.options[s.selectedIndex].setAttribute('selected', 'selected')
} else {
s.options[i].removeAttribute('selected')
}
}
this.compileIfAutoCompileOn()
}

Loading…
Cancel
Save