Skip to content

Commit

Permalink
feat(admin-ui): auto apply highglight on edit page
Browse files Browse the repository at this point in the history
  • Loading branch information
harryandriyan committed Jun 16, 2022
1 parent 6a3358c commit f0da5f2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function CustomScriptForm({ item, scripts, handleSubmit }) {
}
return false
})
const [selectedLanguage, setSelectedLanguage] = useState()
const [selectedLanguage, setSelectedLanguage] = useState(item.programmingLanguage)

function activate() {
if (!init) {
Expand Down Expand Up @@ -331,8 +331,8 @@ function CustomScriptForm({ item, scripts, handleSubmit }) {
}}
>
<option value="">{t('Choose')}...</option>
<option value="java">Java</option>
<option value="python">Jython</option>
<option value="JAVA">Java</option>
<option value="PYTHON">Jython</option>
</CustomInput>
</InputGroup>
{formik.errors.programmingLanguage &&
Expand Down Expand Up @@ -466,7 +466,7 @@ function CustomScriptForm({ item, scripts, handleSubmit }) {
<GluuInputEditor
doc_category={SCRIPT}
name="script"
language={selectedLanguage}
language={selectedLanguage?.toLowerCase()}
label="script"
lsize={2}
rsize={10}
Expand Down

0 comments on commit f0da5f2

Please sign in to comment.