fix
This commit is contained in:
parent
c4d2db694f
commit
f54298fabb
|
@ -890,12 +890,12 @@ class CCPMethodEditorController extends HTMLElement{
|
||||||
}
|
}
|
||||||
|
|
||||||
renderScripts(){
|
renderScripts(){
|
||||||
const index = this.#rootdoc.querySelector("select[name=script-selector]") ? this.#rootdoc.querySelector("select[name=script-selector]").selectedIndex : 0
|
const val = this.#rootdoc.querySelector("select[name=script-selector]") ? this.#rootdoc.querySelector("select[name=script-selector]").value : 'deploy-script'
|
||||||
return this.#current.additionalParameters.parameters.map(
|
return this.#current.additionalParameters.parameters.map(
|
||||||
(script, i) => {
|
(script, i) => {
|
||||||
let code = script.value.length ? script.value.join("\r\n") : ""
|
let code = script.value.length ? script.value.join("\r\n") : ""
|
||||||
return `
|
return `
|
||||||
<textarea rows="5" class="script-area form-control ${i == index ? '' : 'd-none'}" name="${script.name}">${code}</textarea>
|
<textarea rows="5" class="script-area form-control ${script.name === val ? '' : 'd-none'}" name="${script.name}">${code}</textarea>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
).join("\n")
|
).join("\n")
|
||||||
|
|
Loading…
Reference in New Issue