Open jcherrabi opened 2 years ago
Hello there, the PropertyChanged event is triggered twice with this example. when the onOff is clicked, to fix i had to update the below as shown:
async setValue(value: boolean): Promise<boolean> { return new Promise((resolve, reject) => { //super //.setValue(value) // .then((updatedValue) => { // resolve(updatedValue); // this.getDevice().notifyPropertyChanged(this); // }) // .catch((err) => { // reject(err); // }); this.setCachedValue(value); resolve(value); this.getDevice().notifyPropertyChanged(this); }); }
Hello there, the PropertyChanged event is triggered twice with this example. when the onOff is clicked, to fix i had to update the below as shown: