Skip to content

Commit

Permalink
added dropdown for technology selection on infrastructure buildout wh…
Browse files Browse the repository at this point in the history
…en override is selected; still needs functionality to update the technology when a new one is selected
  • Loading branch information
MichaelPesce committed Jul 12, 2023
1 parent 339ccbc commit c61a50e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion electron/ui/src/components/OverrideTable/OverrideTableRows.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ function BinaryVariableRow(props) {
}

}
const handleTechnologySelect = (event) => {
console.log('selected '+event.target.value)
}

return (
<>
Expand All @@ -290,7 +293,29 @@ return (
align={"left"}
key={"" + index + i}
style={i === 0 ? styles.firstCol : styles.other}>
{value[cellIdx].toLocaleString('en-US', {maximumFractionDigits:0})
{(cellIdx === 5 && overrideChecked && rowName === "Treatment Facility") ?
<FormControl sx={{ width: "100%" }} size="small">
<InputLabel id="">Value</InputLabel>
<Select
// disabled={!Object.keys(scenario.override_values[category]).includes(""+index)}
labelId=""
id=""
name={`technology::select`}
value={technology}
label="technology"
onChange={handleTechnologySelect}
>
{
Object.keys(presetValues).map((key,idx) => (
<MenuItem key={`${key}_${idx}`} value={key}>
{key}
</MenuItem>
))
}
</Select>
</FormControl>
:
value[cellIdx].toLocaleString('en-US', {maximumFractionDigits:0})
}
</TableCell>
)
Expand Down

0 comments on commit c61a50e

Please sign in to comment.