Fix: DC capacity now updates when AC capacity changes
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run

This commit is contained in:
Manohar Gupta 2026-05-22 13:39:09 +05:30
parent 941843e441
commit 206b9a0f99

View file

@ -219,7 +219,12 @@ function StepSolar({
value={state.solar_ac_mw}
step={5}
min={1}
onChange={(v) => set("solar_ac_mw", Number(v))}
onChange={(v) => {
const ac = Number(v);
const ratio = state.solar_dc_ac_ratio;
set("solar_ac_mw", ac);
set("solar_dc_mwp", parseFloat((ac * ratio).toFixed(3)));
}}
/>
</Field>
<Field label="DC:AC Ratio">