0.0.2-beta5 • Published 8 years ago

ng2-chosen v0.0.2-beta5

Weekly downloads
43
License
-
Repository
-
Last release
8 years ago

ng2-chosen

An angular2 implementation of Chosen ( Not a wrapper )

The current implementation is far from being complete .. Work on progress

To execute the example .. run the followings commands :

  • npm install to install Node packages
  • bower install to install Bower packages ( run npm install -g bower if you don't have Bower already installed )
  • gulp dev ( run npm install -g gulp if you don't have Gulp already installed )

Currently supported options

OptionDefaultDescription
allow_single_deselectfalseWhen set to true on a single select, Chosen adds a UI element which selects the first element (if it is blank).
disable_searchfalseWhen set to true, Chosen will not display the search field (single selects only).
disable_search_threshold0Hide the search input on single selects if there are n or fewer options.
max_selected_optionsInfinityLimits how many options the user can select. When the limit is reached, the maxselected event is triggered.
no_results_text"No results match"The text to be displayed when no matching results are found. The current search is shown at the end of the text (e.g., No results match "Bad Search").
placeholder_text_multiple"Select Some Options"The text to be displayed as a placeholder when no options are selected for a multiple select.
placeholder_text_single"Select an Option"The text to be displayed as a placeholder when no options are selected for a single select.
single_backstroke_deletetrueBy default, pressing delete/backspace on multiple selects will remove a selected choice. When false, pressing delete/backspace will highlight the last choice, and a second press deselects it.
display_selected_optionstrueBy default, Chosen includes selected options in search results with a special styling. Setting this option to false will hide selected results and exclude them from searches. Note: this is for multiple selects only. In single selects, the selected result will always be displayed.