Skip to content

Commit

Permalink
fix(admin-ui): update location path on script path change
Browse files Browse the repository at this point in the history
  • Loading branch information
jv18creator committed Jul 20, 2023
1 parent d09e180 commit c464876
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ function CustomScriptForm({ item, scripts, handleSubmit, viewOnly }) {
aliases: item.aliases,
moduleProperties: item.moduleProperties,
configurationProperties: item.configurationProperties,
script_path: scriptPath
script_path: scriptPath,
locationPath: item?.locationPath
},
validationSchema: Yup.object({
name: Yup.string()
Expand Down Expand Up @@ -185,6 +186,7 @@ function CustomScriptForm({ item, scripts, handleSubmit, viewOnly }) {

function scriptPathChange(value) {
if (value != '') {
formik.setFieldValue('locationPath', value)
if (!item.moduleProperties) {
item.moduleProperties = []
}
Expand Down

0 comments on commit c464876

Please sign in to comment.