cah-danmonroe / ember-cli-dropdown-list

ember cli dropdown list

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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

Installation

  • git clone <repository-url>
  • cd ember-cli-dropdown-list
  • yarn install

Linting

  • yarn lint:js
  • yarn lint:js --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.

About

ember cli dropdown list

License:MIT License


Languages

Language:JavaScript 79.4%Language:HTML 20.6%