fixed some bugs related to gates component preferences, noww when assigning a new component to a position ie moving the pressure from one component to another it will make sure to remove the old component preference as well as add the new one, and am also making sure to update the gates preferences on the frontend so a page load is not required to set interactions

This commit is contained in:
csawatzky 2026-03-09 14:17:44 -06:00
parent 002959ef47
commit 989ca20a31
3 changed files with 34 additions and 10 deletions

View file

@ -1556,7 +1556,7 @@ export default function BinVisualizer(props: Props) {
let device = componentDevices.get(fan.key)
if(fanComp && device){
return (
<BinControllerDisplay component={fanComp} deviceID={device} currentState/>
<BinControllerDisplay key={fanComp.key()} component={fanComp} deviceID={device} currentState/>
)
}
})}
@ -1565,7 +1565,7 @@ export default function BinVisualizer(props: Props) {
let device = componentDevices.get(heater.key)
if(heaterComp && device){
return (
<BinControllerDisplay component={heaterComp} deviceID={device} currentState={heater.state}/>
<BinControllerDisplay key={heaterComp.key()} component={heaterComp} deviceID={device} currentState={heater.state}/>
)
}
})}