This is the second beta release of Select2 4.0.
This builds upon the previous beta release, so review all previous release notes before upgrading from previous versions of Select2.
New features
- The base path for automatically loading modules in AMD builds can now be changed
- These options should be set when initializing Select2
- Set
amdPath
to the base path (including trailing slash) for theselect2
source - Set
amdLanguagePath
to the base path for theselect2/i18n
source
New events
select2:closing
to complementselect2:opening
select2:select
to complementselect2:unselect
Breaking changes
- The default value of the
width
option has been changed fromstyle
toresolve
. - The
copy
value for thewidth
option has been renamed tostyle
.
Removed events
select2-highlight
select2-loaded
select2-focus
- Use the nativefocus
event insteadselect2-blur
- Use the nativeblur
event instead- All extra properties of
change
have been removedval
- Use$element.val()
insteadremoved
- Use theselect2:unselect
event insteadadded
- Use theselect2-selected
event instead
Renamed options
createSearchChoice
->createTag
selectOnBlur
->selectOnClose
Renamed events
select2-open
->select2:open
select2-opening
->select2:opening
select2-close
->select2:close
select2-selecting
->select2:selecting
select2-removed
->select2:unselect
select2-removing
->select2:unselecting