For a single property change, is it normal for the getPropsReducer method function trigger twice? I have seen times where it has triggered three times. Here’s my code and a video.
Thanks again!
export class ValveBasicMeta implements ComponentMeta {
getComponentType(): string {
return COMPONENT_TYPE;
}
getDefaultSize(): SizeObject {
return ({
width: 150,
height: 100
});
}
getViewComponent(): PComponent {
return ValveBasic;
}
getPropsReducer(tree: PropertyTree): ValveBasicProps {
logger.info(() => `ValveBasic getPropsReducer called.`);
let UdtValveBasic = {
intStateNumber: -3,
strName: "strName",
strPidTagName: "strPidTagName",
UdtHmiCmds: {
boolClose: false,
boolOpen: false,
boolReset: false,
intHandOffAuto: -3
}
};
return {
UdtValveBasic: tree.read("UdtValveBasic", UdtValveBasic),
imageUrls: tree.readArray("imageUrls")
};
}
}