1
0
mirror of synced 2024-11-22 21:16:10 +03:00
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
Go to file
Kevin Brown 3d1dc36711 Added support for placeholders
Placeholder support has been implemented as a separate module, so
any selection container should be able to be decorated and get
instant placeholder support. It hooks into the updating method of
selections, and determines when to display the placeholder based
on the options that are being updated.

It works in the same way as the old placeholders. If no options
are selected and being displayed, like in the case of a multiple
select, then the placeholder will always be shown.  If one option
is being displayed, and the id of the placeholder matches the id
of the selected element, then the placeholder will be shown.  This
is similar to the functionality that was present in Select2 2.x,
where the placeholder could be passed in as an object that would
be compared to the selection.

This still requires that, for single selects, the first element
must match the placeholder id.  Because the default placeholder id
is a blank string, this will maintain backwards compatibility with
past versions where the first option should be blank.  This can
still be overridden to point at a different id, keeping support
for systems where the placeholder doesn't use a blank value.

**Note:** This does not hide the blank option for single selects,
but that will still be maintained for backwards compatibility
within the results module.  It will not depend on a placeholder
being present, but instead will hide any options with blank text.
2014-10-21 21:43:59 -04:00
dist Added support for placeholders 2014-10-21 21:43:59 -04:00
docs Added support for placeholders 2014-10-21 21:43:59 -04:00
src Added support for placeholders 2014-10-21 21:43:59 -04:00
tests Added tests for the query function 2014-10-21 21:43:59 -04:00
vendor Work on the AMD scaffolding 2014-10-21 21:43:56 -04:00
.editorconfig Working on rendering everything 2014-10-21 21:43:56 -04:00
.gitignore Work on the AMD scaffolding 2014-10-21 21:43:56 -04:00
.jshintignore Added very basic jshint config 2014-10-21 21:43:57 -04:00
.jshintrc Improved the jshint config a bit more 2014-10-21 21:43:58 -04:00
.travis.yml Add travis 2014-10-21 21:43:57 -04:00
CONTRIBUTING.md Fixed a few links 2014-08-12 20:52:10 -04:00
Gruntfile.js Fixed problems with non-string ids 2014-10-21 21:43:59 -04:00
package.json Added very basic jshint config 2014-10-21 21:43:57 -04:00
select2_locale_ug-CN.js Changed Uyghur translation 2014-07-11 19:02:57 +08:00