Unverified Commit 3e081601 authored by mvdbeek's avatar mvdbeek
Browse files

Fix local version switching

Fixes https://github.com/galaxyproject/galaxy/issues/14311.
Problem is that we use `:key` in
https://github.com/mvdbeek/galaxy/blob/9e4563d9eb5d8f38a48e1f01466d4fcd1fc66502/client/src/components/Form/FormDisplay.vue#L3,
so that doesn't re-render when the tool id doesn't change (which is the
case for local tools, but not toolshed tools).
parent 9162d57b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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})`;
        },