Hello,
On change events on lookup fields seem to be running no matter if the value changes or not, i.e : if I have a value val1 in a lookup field A, and open the selector again and select the same value val1, then it will run all onchange events we have on field A.
I didn't try with all type of fields, but wioth a text field for example, the on change event is running only when the value of the text actually changes (previous value != current value), and not each time we typing something in the field.
Is that a specific behavior to lookups? Because we think on change events should only run when values change ...
Thanks,
Meryem
Meryem, Lookup selector field is a composite control (i.e. kendo picklist & associated selector buttons) & such behavior is expected as we are always resetting the value on returning from selector dialog.
With Rollbase 4.0.5 release, we are going to add fieldContext.hasValueChanged() interface method. You can leverage this within the onchange handlers to identify whether a field value has actually changed or not.
Meryem, Lookup selector field is a composite control (i.e. kendo picklist & associated selector buttons) & such behavior is expected as we are always resetting the value on returning from selector dialog.
With Rollbase 4.0.5 release, we are going to add fieldContext.hasValueChanged() interface method. You can leverage this within the onchange handlers to identify whether a field value has actually changed or not.
Hi Siraj,
Ok I understand. The hasValueChanged() method is a nice one to have. Thank you :)
But what about other fields (not lookups) ?
Thanks
Meryem
If you are enquiring about whether other fields will also have the same interface method i.e. hasValueChanged(), answer is YES.
But as you stated earlier, do not think this should be an issue with other fields.
Hello Siraj,
I would expect all fields to behave the same. i.e. The on-change event to fire on all fields when the value has changed regardless of it being a look-up, pick-list or a text field. This behavior doesn't look uniform across Rollbase.
cheers,
Hosny