Uploaded image for project: '[Read Only] - Hippo Theme'
  1. [Read Only] - Hippo Theme
  2. HIPPOTHEME-39

10.0: select-box broken for dynamic options

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • None
    • 1.02.01

    Description

      After upgrading Essentials to use Angular 1.3.1 (ESSENTIALS-531), we're getting weird behavior of the "Chosen" selection fields, if they use dynamic options (i.e. retrieve the set of applicable options from a REST service).

      After quite some debugging, we found that the following is happening:

      Once the set of applicable options is retrieved from the back-end and set on the variable bound to both the "ng-options" and the "data-options". (A) The "ng-options" binding causes Angular to populate the <option> child nodes of the <select> node. (B) The "data-options" binding causes the hippo.theme.select-box to trigger Chosen's mechanism to parse the <option>s and populate Chosen's selection list. While (A) should happen before (B) for this to work, we see that on Angular 1.3.1, (B) happens before (A), rendering the select box broken.

      I was able to work around this by using a different scope-variable bound to "data-options", and only change it after a timeout (during which I expect the process triggered by (A) to have completed). However, it is undoable to implement this work-around for every instantiation of the hippo.theme.select-box.

      If we want to keep using Angular 1.3.1 for Essentials 10.0, then this is a blocking issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tjeger Tobias Jeger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: