Merge pull request #14319 from mvdbeek/local_tool_version_switxh

[22.01] Fix local version switching
This commit is contained in:
Dannon
2022-07-12 20:11:52 -04:00
committed by GitHub
+7 -1
View File
@@ -45,7 +45,7 @@
itemtype="https://schema.org/CreativeWork">
<template v-slot:body>
<FormDisplay
:id="formConfig.id"
:id="toolId"
:inputs="formConfig.inputs"
:validation-scroll-to="validationScrollTo"
@onChange="onChange"
@@ -185,6 +185,12 @@ export default {
toolName() {
return this.formConfig.name;
},
toolId() {
// ensure version is included in tool id, otherwise form inputs are
// not re-rendered when versions change.
const { id, version } = this.formConfig;
return id.endsWith(version) ? id : `${id}/${version}`;
},
tooltip() {
return `Execute: ${this.formConfig.name} (${this.formConfig.version})`;
},