mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-07 16:58:51 -06:00
web: ThermalUnits: onDataChanged
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
import { ColumnDefinition } from "tabulator-tables";
|
||||
import { offerDownload } from "../Common/io";
|
||||
import {
|
||||
changeThermalUnitData,
|
||||
createThermalUnit,
|
||||
deleteGenerator,
|
||||
renameGenerator,
|
||||
@@ -194,17 +195,17 @@ const ThermalUnitsComponent = (props: CaseBuilderSectionProps) => {
|
||||
field: string,
|
||||
newValue: string,
|
||||
): ValidationError | null => {
|
||||
// const [newScenario, err] = changeThermalUnitData(
|
||||
// name,
|
||||
// field,
|
||||
// newValue,
|
||||
// props.scenario,
|
||||
// );
|
||||
// if (err) {
|
||||
// props.onError(err.message);
|
||||
// return err;
|
||||
// }
|
||||
// props.onDataChanged(newScenario);
|
||||
const [newScenario, err] = changeThermalUnitData(
|
||||
name,
|
||||
field,
|
||||
newValue,
|
||||
props.scenario,
|
||||
);
|
||||
if (err) {
|
||||
props.onError(err.message);
|
||||
return err;
|
||||
}
|
||||
props.onDataChanged(newScenario);
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user