Skip to content

bug: select element not updating on user interactions, ngshow uses its model #3003

Closed
@alexkb

Description

@alexkb

Type: bug

Platform: android 4.4 webview

I have a non-dynamic select field in my view with several options, and a number of ng-show conditions later on in the view that use the value of said select field to determine if they should display or not.

The ng-show blocks toggle when they're suppose to meaning the model is updating as expected but the select field rendering the model value doesn't. There's no special controller code changing the model, just the user interacting with the field.

The code looks something like this:

<label class="item item-input item-select">
  <div class="input-label">
    Selection
  </div>
  <select ng-model="data.mySelection">
    <option>1</option>
    <option>2</option>
    <option>3</option>
  </select>
</label>

<div ng-show="data.mySelection == '2'">
  <ion-toggle ng-model="data.extraOption" toggle-class="toggle-calm">Extra Option</ion-toggle>
</div>

I can't replicate the issue in Chrome (via ionic serve), it only seems to be an issue after a mobile build for Android (and I haven't tried iOS yet).

Am I doing something wrong here or is this an ionic/angular bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions