Dynamic data notifyPropertyChanged not working as expected
Category
- [ ] Question
- [ ] Typo
- [x] Bug
- [ ] Additional article idea
Expected or Desired Behavior
this.context.dynamicDataSourceManager.notifyPropertyChanged([property]) should only notify consumers that are listening for the specific property.
Observed Behavior
Multiple connected webparts (1 source, 2 consumers), each webpart listening to different properties from source: this.context.dynamicDataProvider.registerPropertyChanged(this.properties.sourceId, this.properties.propertyId, this.render)
When source calls: this.context.dynamicDataSourceManager.notifyPropertyChanged([property]) all webparts are notified even though they are not registered for the property that has changed. The webpart listning for the specific property is called 2 times, others just 1. If the source adds a random string as parameter to notifyPropertyChanged all webparts are also called.
Steps to Reproduce
Create 3 connected webparts. 1 source with 2 getPropertyDefinitions 2 consumers listeling to different propertyIds.
@jeslas - Thank you for raising the concern.
I looked into it, and yes you are right, it is wrongly firing the event. It's a bug in the system and I will fix it and update the thread accordingly.
Thanks again! Srikanth
This should be fixed now. Can you please check and confirm the same? I am closing the bug now, but feel free to re-open it if you don't see it fixed.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues