Skip to content

Commit

Permalink
correcting behaviour with key update (#3533)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Szendrey authored May 3, 2024
1 parent ab1e747 commit 76f30d0
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<Button outlined size="small" label="Add Intervention" @click="addIntervention" />
<tera-model-intervention
v-for="(intervention, idx) of knobs.transientModelConfig.interventions"
:key="intervention.name + intervention.timestep"
:key="intervention.name + intervention.timestep + intervention.value"
:intervention="intervention"
:parameter-options="Object.keys(mmt.parameters)"
@update-value="
Expand Down Expand Up @@ -838,7 +838,7 @@ const initialize = async () => {
}
// State already been set up use it instead:
else {
knobs.value.transientModelConfig = state.transientModelConfig;
knobs.value.transientModelConfig = cloneDeep(state.transientModelConfig);
}
// Ensure the parameters have constant and distributions for editing in children components
Expand Down Expand Up @@ -881,8 +881,7 @@ const initialize = async () => {
const applyConfigValues = (config: ModelConfiguration) => {
const state = cloneDeep(props.node.state);
knobs.value.transientModelConfig = config;
knobs.value.transientModelConfig = cloneDeep(config);
// Update output port:
if (!config.id) {
Expand Down

0 comments on commit 76f30d0

Please sign in to comment.