From 07a66d74cf30062a472a54f7f4ea66d320530a60 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 26 Nov 2020 16:12:37 +0530 Subject: [PATCH] added selected attribute for evmVersionSelector --- .../src/app/tabs/compileTab/compilerContainer.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js index 6cbdcfb0c4..7be41bc1c7 100644 --- a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js +++ b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js @@ -230,8 +230,11 @@ class CompilerContainer { ` 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() }