Switch: Try to set the propertyChange event to Switch via Typescript


Hi there, I am trying to hook the propertyChange event to a Switch via Typescript but seems like I am missing something, this is my code:

let switch1 = new Switch();
switch1.on('propertyChange', (args) => {

Am I missing some code?



Using propertyChange event was 2.x architecture, starting 3.x you have use the propertyName + “change” for listening to changes on UI components. If you want to monitor changes on checked property, the event you need is checkedChange.