Materialize: can't pre select multiple options

Created on 13 Jan 2016  路  4Comments  路  Source: Dogfalo/materialize

i can't pre select multiple options in a multiple select

example:

 <div class="input-field col s12">
    <select multiple>
      <option value="1" selected>Option 1</option>
      <option value="2" selected>Option 2</option>
      <option value="3" selected>Option 3</option>
    </select>
    <label>Materialize Select</label>
  </div>

All 4 comments

This issue still affects me.

@dgadelha
Please provide a way to reproduce it to see what's happening. like a codepen

My bad, didn't notice that when dynamically adding items you must call $("select").material_select("update");

$("select").material_select("update"); not making any difference. When i initialise pre-selected data, It is showing undefined and no options are selected. If any one has found solution share it. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PhillippOhlandt picture PhillippOhlandt  路  3Comments

acierpinski picture acierpinski  路  3Comments

ericlormul picture ericlormul  路  3Comments

serkandurusoy picture serkandurusoy  路  3Comments

ruslandzhumaev picture ruslandzhumaev  路  3Comments