Skip to content

Unexpected close of select with multiple option  #136

Description

Hi

I want the user to be able to select multiple numbers in a 1 to 100 sequence. That selection would be mirrored in the counts variable.

Concretely counts is the ngModel of the select that is multiple and contains a ngModelChange callback that allows me to do my logic after the selection change.

This works, however, the UI interaction seems broken:

  • Clicking the first option directly closes the select's panel (unexpected).
  • Clicking the other option works as expected (panel not closed, option ticked or unticked)

What coule be wrong ?
(I was not able to build a plunkr, if you have one with angular2-materialize working I'd try to reproduce...)

Regards

  <div class="row">
    <div class="input-field col s4">
      <select [(ngModel)]="counts" (ngModelChange)="onCountChange($event)" materialize="material_select" multiple>
        <option value="" disabled selected>Please pick</option>
        <option value="1">one</option><!-- Clicking that option has an unexpected behavior -->
        <option value="2">two</option>
         ....
        <option value="100">onehundred</option>
      </select>
      <label>Count</label>
    </div>
  </div>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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