Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
MIT License
Bot releases are hidden (Show)
<input />
to a <textarea>
to support pasting multiple lines (#5806)te
) (#5881)hu
) for 4.1.0 changes (#5970)Published by kevin-brown over 4 years ago
selectionCssClass
option now works when used without containerCssClass
(#5815, #5847)autocomplete
attribute is now copied over to the Select2 search field (#5839)Select2 is a looking for sponsors to keep development active. Interested in seeing Select2 continue to be developed? Sponsor @kevin-brown (and by extension, Select2) on GitHub Sponsors or sponsor Select2 on Open Collective!
Published by kevin-brown over 4 years ago
<input />
tagsinitSelection
query
select2/compat/matcher
moduledropdownCss
optionadaptDropdownCss
optioncontainerCss
optionadaptContainerCss
optioncontainerCssClass
option has been renamed to selectionCssClass
(#5815)dropdownCssClass
and selectionCssClass
are now available in all builds of Select2 (#5815)eo
) (#5823)pa
) (#5831)amdLanguageBase
option no longer has an effect because the full build does not include any dynamically loaded modules (#5815)Select2 is a looking for sponsors to keep development active. Interested in seeing Select2 continue to be developed? Sponsor @kevin-brown (and by extension, Select2) on GitHub Sponsors or sponsor Select2 on Open Collective!
Published by kevin-brown over 4 years ago
input
event before change
events (#4649)selection:update
once on DOM change events (#5734)Select2 is a looking for sponsors to keep development active. Interested in seeing Select2 continue to be developed? Sponsor @kevin-brown (and by extension, Select2) on GitHub Sponsors or sponsor Select2 on Open Collective!
Published by kevin-brown almost 5 years ago
<html>
element (#5682)Select2 is a looking for sponsors to keep development active. Interested in seeing Select2 continue to be developed? Sponsor @kevin-brown (and by extension, Select2) on GitHub Sponsors!
Published by kevin-brown about 5 years ago
Published by kevin-brown about 5 years ago
dropdownParent
option (#5622)Published by kevin-brown about 5 years ago
language
option now has a clearly defined fallback chain (#5602)maximumSelectionLength
being ignored by closeOnSelect
(#5581)allowClear
no longer shifts selections to a new line (#5603)Published by kevin-brown about 5 years ago
<option>
(#5560)computedstyle
option for calculating the width (#5559).select2-selection__placeholder
CSS definitions for multiple selects (#5508)Published by kevin-brown over 5 years ago
Published by kevin-brown over 5 years ago
Published by kevin-brown over 5 years ago
clear
and clearing
events (#5058)scrollAfterSelect
option (#5150);
before beginning of factory wrapper (#5089)select2-selection__rendered
when selection is cleared (#4640, #4746)Defaults.set()
(#4364)Utils.__cache
instead of using $.data
(#4346, #5486)selection:update
(#4306).select2-hidden-accessible
(#4908)tk
) (#5125)sq
) (#5199)ka
) (#5179)ne
) (#5295)bn
) (#5248)removeAllItems
translation for clear "x" title (#5291)Published by alexweissman almost 7 years ago
data('select2')
(#4014)tk
) (#5125)Published by alexweissman almost 7 years ago
clear
and clearing
events (#5058);
before beginning of factory wrapper (#5089)select2-selection__rendered
when selection is cleared (#4640, #4746)Defaults.set()
(#4364)Utils.__cache
instead of using $.data
(#4346)selection:update
(#4306).select2-hidden-accessible
(#4908)Published by alexweissman almost 7 years ago
autocapitalize=off
with autocapitalize=none
(#4994)ps
) (#4960)dsb
and hsb
) (#4949)inputTooShort
message (#4817, 4896)af
) (#4850)bs
) (#4504)Published by kevin-brown about 7 years ago
This is the fourth bugfix release of Select2 4.0.0. It builds upon the third bugfix release and fixes many common issues.
0
option values (https://github.com/select2/select2/commit/16b4840c0e2df0461998e3b464ee0a546173950d, https://github.com/select2/select2/commit/0358ee528765157234643d289bce6b8ca5889c72)<select>
serialization example (https://github.com/select2/select2/pull/4538)errorLoading
Hungarian translation (https://github.com/select2/select2/commit/7d1d13352321e21670ff1c6cba7413aa264fd57a)errorLoading
German translation (https://github.com/select2/select2/commit/4df965219ea4c39147fde9335bc260840465933a)errorLoading
Galician translation (https://github.com/select2/select2/commit/8fcc6202c37f4e06d951342bf142a3b906b6b8e3)errorLoading
Thai translation (https://github.com/select2/select2/commit/625fc78ee616baedf64aa37357403b4b72c7363c)searching
and errorLoading
Finnish translations (https://github.com/select2/select2/pull/4730)errorLoading
Turkish translation (https://github.com/select2/select2/commit/fd4a0825315c7055347726d5818c999279f96ff8, https://github.com/select2/select2/commit/751b36767f9f28b9de9428d5e8035c9a404915d9)Published by kevin-brown over 8 years ago
This is the third bugfix release of Select2 4.0.0. It builds upon the second bugfix release and fixes many common issues.
dropdownAutoWidth
option now properly works [https://github.com/select2/select2/commit/fe26b083eb830836061de1458e483782cefef424]focus
event on the original <select>
is now handled [https://github.com/select2/select2/commit/31e7a1d4c52ed7477769fcad5d15166ae3c9b4d0]select2('option')
no longer mutate the arguments when working on multiple elements [https://github.com/select2/select2/commit/c2c1aeef31c95c6df5545c900a4e1782d712497c]selectOnClose
now works properly with closeOnSelect
[https://github.com/select2/select2/commit/481c43883e23874e9c35879d173eb8cc5b994b12]ajax.delay
to empty search terms as well [https://github.com/select2/select2/commit/4b9e02f02211248be25ac4c16d4635cf38237bb9]<label>
[https://github.com/select2/select2/commit/3bc7f4ac78b58eff8cd17b3273596638c3c9c5c1]ajax.url
[https://github.com/select2/select2/commit/5a831afb9a7d46e8f20aec21164cfbfd182024de]errorLoading
[https://github.com/select2/select2/pull/4259]errorLoading
[https://github.com/select2/select2/commit/b1ea28bb7d8c02b3b352f558031ccfc8041122eb]Published by kevin-brown over 8 years ago
This is the second bugfix release of Select2 4.0.0. It builds upon the first release candidate of Select2 4.0.2 with some minor improvements.
- Added
insertTag
option to control the placement of thetags
option [https://github.com/select2/select2/pull/4008]- Added handler for AJAX errors [https://github.com/select2/select2/issues/3501]
- Added insertTag to control the tag position [https://github.com/select2/select2/pull/4008]
- Fixed positioning issues with static dropdown parents [https://github.com/select2/select2/issues/3970]
- Fixed existing selections not always being respected with array data [https://github.com/select2/select2/issues/3990]
- Sanitize automatically generated ids so CSS identifiers can be used [https://github.com/select2/select2/issues/3618]
- Recursively apply defaults so AJAX defaults can be set [https://github.com/select2/select2/commit/983cd8e765c5345bfe7d3bdcc3b0c882a35461ca]
- No need to recalculate the top of the dropdown twice [https://github.com/select2/select2/pull/4155]
- Updated Bootstrap and Font Awesome dependencies [https://github.com/select2/select2/commit/a5e539b509778eabeb8ce79e191b3ee1e81f6deb, https://github.com/select2/select2/commit/81a4a68b113e0d3e0fb1d0f8b1c33ae1b48ba04f, https://github.com/select2/select2/commit/6369f5f173fb81ec692213782945cc737e248da5]
- Use Jekyll's highlighting instead of prettify [https://github.com/select2/select2/commit/54441e6a22be3969dd934ccb769f5d7dde684bfb, https://github.com/select2/select2/commit/74387b98632c75b06d15d83ad5359b9daf0f5dcb, https://github.com/select2/select2/commit/a126b53b4c90fac33b5d855894647cd8bcac3558, https://github.com/select2/select2/commit/75163d67cb80e4279965a97e9eeda5b171806085]
- Corrected responsive width example to properly show it working [https://github.com/select2/select2/commit/63d531a9c0ab51f05327492a56f3245777762b45]
- Replaced protocol-relative URLs with HTTPS protocol [https://github.com/select2/select2/pull/4127]
- Code snippets for mapping
id
andtext
[https://github.com/select2/select2/issues/4086]- Document how to trigger
change
just for Select2 [https://github.com/select2/select2/issues/3620]- Added notes about DOM events [https://github.com/select2/select2/commit/37dbe059fce4578b46b7561e6243b7fdc63ac002]
Published by kevin-brown over 8 years ago
insertTag
option to control the placement of the tags
option [https://github.com/select2/select2/pull/4008]id
and text
[https://github.com/select2/select2/issues/4086]change
just for Select2 [https://github.com/select2/select2/issues/3620]Published by kevin-brown almost 9 years ago
This is the first bugfix release of Select2 4.0.0. It builds upon the first release candidate of Select2 4.0.1 with some minor improvements.
templateResult
[https://github.com/select2/select2/commit/dc516e7073605723be59bc727b96a3b3dea1ae5a]
- The option container is now passed in as the second argument when templating selections using
templateSelection
[https://github.com/select2/select2/pull/3324]- You can immediately start typing to search when tabbing into a multiple select [https://github.com/select2/select2/commit/02cca7baa7b78e73cdcf393172ee3a54be387167, https://github.com/select2/select2/commit/79cdcc0956e242c1ce642bbaa93e538c54f4be0]
- All parameters passed in for AJAX requests are now set as query string parameters by default [https://github.com/select2/select2/issues/3548]
selectOnClose
and now be used with closeOnSelect
without getting a stack overflow [https://github.com/select2/select2/commit/393ca4cf7f7f7097d3a994bda3dbf195e945eba1]
- Fixed bug where multiple selects with placeholders were buggy in IE [https://github.com/select2/select2/issues/3300]
- Fixed bug where AJAX selects could not be initialized with array data [https://github.com/select2/select2/pull/3375]
:all:
is now correctly removed when used incontainerCss
anddropdownCss
options [https://github.com/select2/select2/pull/3464]- Fixed bug where the multiple select search box would appear on the left in RTL mode [https://github.com/select2/select2/pull/3502]
- Change ALT + UP to close the dropdown instead of opening it [https://github.com/select2/select2/commit/d2346cc33186c2a00fa2dad29e8e559c42bfea00]
- Fix focus issue with the multiple select search box when the
change
event was triggered [https://github.com/select2/select2/commit/698fe7b9e187e182f679aa679eb8b0ecb64a846b, https://github.com/select2/select2/commit/88503d2c67dc7f4fb9395a17f17edfe4948cf738, https://github.com/select2/select2/commit/dd2990adead92593a2dffff6ae004ea8b647d130]- Fix bug in
ArrayAdapter
where the existing<option>
data would be used instead of the array data [https://github.com/select2/select2/pull/3565]- Remove random call to
$dropdownContainer.width()
in theAttachBody
decorator [https://github.com/select2/select2/pull/3654]- Fix memory leak in
AttachBody
decorator [https://github.com/select2/select2/commit/671f5a2ce21005090e0b69059799cd3dd1fbbf84]- Selections can no longer be removed when Select2 is in a disabled state [https://github.com/select2/select2/commit/68d068f1d2c7722d011d285a291d1f974bf09772, https://github.com/select2/select2/commit/7d8f86cbf85ebd2179195ff6a2a7a1c5dcb9da58]
- Remove redundant
open
event trigger [https://github.com/select2/select2/pull/3507]- Correct references to
this
inajax.data
andajax.url
callback functions [https://github.com/select2/select2/issues/3361]- Apply select2('option') calls on all elements [https://github.com/select2/select2/pull/3495]
- Fixed original
<select>
not always being hidden correctly in some cases [https://github.com/select2/select2/pull/3301]- Fix potential issue with Bootstrap's gradients in Internet Explorer [https://github.com/select2/select2/pull/3307]
- Improve compatibility with Zurb Foundation [https://github.com/select2/select2/pull/3290]
- Remove padding on mobile safari search field in multiple selects [https://github.com/select2/select2/pull/3605]
- Fix the clear button appearing beneath long text [https://github.com/select2/select2/issues/3306]
- Migrate the CSS classes for the "Loading more results" message to BEM [https://github.com/select2/select2/issues/3889]
- Fix inline search not displaying properly in Safari [https://github.com/select2/select2/issues/3459]
- New documentation theme designed by @fk [https://github.com/select2/select2/pull/3376, https://github.com/select2/select2/pull/3467, https://github.com/select2/select2/pull/3488]
- Update ajax example to reflect pagination [https://github.com/select2/select2/pull/3357]
- Fix incorrect option name in
maxiumSelectionLength
example [https://github.com/select2/select2/pull/3454]- Fix typos in the disabled mode/results examples [https://github.com/select2/select2/pull/3665]
- Fix
Option
parameters in the 4.0 announcement [https://github.com/select2/select2/pull/3547]- Fix invalid JSON in the tags example within the 4.0 announcement [https://github.com/select2/select2/pull/3637]
- Swapped the
inputTooLong
andinputTooShort
messages in the Galician translation [https://github.com/select2/select2/pull/3291]- Fix improper grammar in Dutch translation [https://github.com/select2/select2/pull/3692]
- Add Japanese translation [https://github.com/select2/select2/pull/3477]
- Polish translation: Fixed typo in maximum selected message [https://github.com/select2/select2/pull/3587]
- Add Malay translation [https://github.com/select2/select2/pull/3635]
- Add
errorLoading
for Indonesian translation [https://github.com/select2/select2/pull/3635]- Correct grammar issues in Hebrew translation [https://github.com/select2/select2/pull/3911]
- Add
errorLoading
for Danish translation [https://github.com/select2/select2/pull/3870]- Add Arabic translation [https://github.com/select2/select2/pull/3859]
Changes that were made in the first release candidate of Select 4.0.1 are included as quoted portions.