Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 927 Bytes

README.md

File metadata and controls

37 lines (28 loc) · 927 Bytes

elm-combobox (example)

How to use

Write elm-code for combobox use:

  Combobox.view [class "combobox custom-skin1"] (LC.create ComboAction1 actionChannel) model.combo1

You can change combobox style by adding css-classes .custom-skin, default class .combobox, in css/style.css. There are predefined black - .custom-skin1 & white - .combobox classes.

Elm generate html:

<div class="combobox custom-skin1">
  <input type="text">
  <div class="fadeIn combobox-list">
    <div class="combobox-list-item combobox-active">
      Your data
    </div>
    <div class="combobox-list-item">
      Your data
    </div>
  </div>
</div>

Data pushing in model:

initialModel = { combo1 = Combobox.initialModel Countries.list 10
               , combo2 = Combobox.initialModel Countries.list  5}

5, 10 - Custom Int size of dropdown list