CRM-20871 - crmUiSelect - UI should stay in sync with model #10659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
crmUiSelect
defines the function$render()
-- whenever the model changes, it should execute$render()
to update the UI. But it doesn't.This issue is discussed more in https://stackoverflow.com/questions/21084088/why-ngmodels-render-is-not-called-when-the-model-changes-in-angularjs
== Before ==
The
$render()
function for directivecrm-ui-select
is not called because theselect
directive overrides it.
== After ==
The
$render()
function for directivecrm-ui-select
is called, even ifused on a
select
element.== Acceptance Criteria ==
In "org.civicrm.civicase", the "Clear filters" and "Activity Category" stay synchronized.
In "org.example.angpage" ("civicrm/a/#/play"), all element stay synchronized.
Existing screens which use the crmUiSelect element work as expected. (For ideas, perhaps grep the codebase and also check the history from CRM-20390.)