mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
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).
This commit is contained in:
@@ -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})`;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user