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:
parent
002959ef47
commit
989ca20a31
3 changed files with 34 additions and 10 deletions
|
|
@ -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}/>
|
||||
)
|
||||
}
|
||||
})}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue