Populate modelInput with sim result input - #597
Conversation
de407c5 to
90bff06
Compare
|
quick view it seems as if going back and forth works, but it doesn't. As can be seen when using the same model (the results are updated, but not the input): Screen.Recording.2025-12-01.at.16.36.38.movWhen we use refresh however, it works: Screen.Recording.2025-12-01.at.16.37.45.movquick extra to show parameters changing and adding components: Screen.Recording.2025-12-01.at.16.28.19.mov |
|
but going to the url works quite well, so perhaps it's more about making the "back" and "forward" update url correctly. |
|
tried handling this with using inputsStep = models.map((model) => {
const isCurrentModel = model.modelId === currentModel?.modelId;
const defaultConcentrations = isCurrentModel ? simulationResults?.modelInput?.concentrations : undefined;
const defaultParameters = isCurrentModel ? simulationResults?.modelInput?.parameters : undefined;
return (
<ModelInputs
key={`${model.modelId}-${JSON.stringify(defaultConcentrations)}-${JSON.stringify(defaultParameters)}`}
model={model}
visible={isCurrentModel}
onSubmit={(concentrations, parameters) =>
setModelInput({ modelId: model.modelId, concentrations, parameters })
}
defaultConcentrations={defaultConcentrations}
defaultParameters={defaultParameters}
/>
);
});but getting issue where when a user press (also all input models all of a sudden has the same concentrations (eg invalid components are listed..)) |
solves: #596
fixes concentrations, but not parameters, those are slightly more trickyWill not interfere with any of the input concentrations from other models