ember-cli-dropdown-list

2.0.6 • Public • Published

Ember Observer Score Build Status Coverage Status NPM Version NPM Downloads Dependency Status DevDependency Status Greenkeeper

ember-cli-dropdown-list

This dropdown supports single selections as well as multiple sections. See example usage below.

DEMO

Installation

ember install ember-cli-dropdown-list

Compatibility

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above

Usage

    single item selection example
 
    {{dropdown-list
        content=myDataList
        value=myAwesomeValue
        class="chosen-select"
        action="myChangeAction"
        prompt="Choose your poison"
        optionValuePath="content.value"
        optionLabelPath="content.label"
    }}
 
    multiple item selection example
 
    {{dropdown-list
        content=myDataList
        value=myAwesomeValues
        class="chosen-select"
        action="myChangeAction"
        prompt="Choose your poisons"
        optionValuePath="content.value"
        optionLabelPath="content.label"
    }}
 
    content: Array<object>
    optionValuePath: string denoting the path to an item in the content array to use when updating the value property (see below for information on value)
    optionLabelPath: string denoting the path to an item in the content array to use as a nice string to render in the list item
    value: object that should be updated with the selected value in the dropdown list. The actual value set is dependent on the optionValuePath
    multiple: boolean value denoting whether multiple items in the list can be selected. Default is false.
    class: string that should be used as class name for the select element
    prompt: optional string to display on the top of the dropdown list when nothing is selected
    action: name of function to invoke when the selected option changes

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Dependents (0)

Package Sidebar

Install

npm i ember-cli-dropdown-list

Weekly Downloads

1

Version

2.0.6

License

MIT

Unpacked Size

11.4 kB

Total Files

9

Last publish

Collaborators

  • devotox