Afform - Fix showing default values for EntityRef fields
authorColeman Watts <coleman@civicrm.org>
Wed, 5 Apr 2023 16:37:31 +0000 (12:37 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 5 Apr 2023 16:37:31 +0000 (12:37 -0400)
commit6f06261daeac8a93fb8b7db32c23d3572fa97975
tree456196a579d746b6c63ae0271dd25e4fd8fc29b5
parent15a9b3fba025632edff5fcb2c8f4eb4bcea1a13b
Afform - Fix showing default values for EntityRef fields

There was some back-and-forth with this. #25374 removed the change() trigger, which fixed
the recursion bug described in https://lab.civicrm.org/dev/core/-/issues/4083 but broke
setting defaults, prompting #25465 which proposed to change it back.

This fix walks the line by triggering the change event but only when the value has actually changed.
Fixes dev/core#4110
ang/crmUi.js