Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20871 - crmUiSelect - UI should stay in sync with model #10659

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

totten
Copy link
Member

@totten totten commented Jul 14, 2017

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 directive crm-ui-select is not called because the select
directive overrides it.

== After ==

The $render() function for directive crm-ui-select is called, even if
used on a select element.

== Acceptance Criteria ==

  1. In "org.civicrm.civicase", the "Clear filters" and "Activity Category" stay synchronized.

  2. In "org.example.angpage" ("civicrm/a/#/play"), all element stay synchronized.

  3. Existing screens which use the crmUiSelect element work as expected. (For ideas, perhaps grep the codebase and also check the history from CRM-20390.)



The `crmUiSelect` defines the function `$render()` -- whenever the model
changes, it should update 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 directive `crm-ui-select` is not called because the `select`
directive overrides it.

== After ==

The `$render()` function for directive `crm-ui-select` is called, even if
used on a `select` element.

== Acceptance Criteria ==

 * The test page in https://github.com/totten/org.example.angpage (`civicrm/a/#/play`)
   keeps elements synchronized.
 * Existing screens which use `crm-ui-select` continue to work.
@colemanw
Copy link
Member

I was having the same problem on the People tab.
Tested and confirmed that this patch fixes it.

@colemanw colemanw merged commit b44fe24 into civicrm:master Jul 14, 2017
@totten totten deleted the master-crmuiselect branch July 14, 2017 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants