Hello-
I observed a somewhat unexpected behavior. Per documentation: https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/control/updateview :
"This method will be called when any value in the property bag has changed. This includes field values". However, it seems the runtime is throttling/staging calls, and skip some calls within a timewindow.
I have a PCF bound to a field. In my form script, I have code
var myAttr = formContext.getAttribute('myfield');
myAttr.setValue("1");
myAttr.fireOnChange();
myAttr.setValue("2");
myAttr.fireOnChange();
myAttr.setValue("3");
myAttr.fireOnChange();Then in my PCF I logged the attribute value inside updateView function.
I was expecting that I see all three values per control, because the fireOnChange should invoke all registered controls that bounded to the field and call the updateView.
I am only getting the value 3, but not 1 or 2.
That seems suggest the runtime somehow stage the call within a timewindow, and only invoke the last one and cancel previous ones. It's not uncommon to do this for performance reasons, but it does impact how client should write code if it is by design.
Anyone from PCF team can comment on that?
Thanks!