github select2/select2 4.0.0-beta.2
4.0.0 Beta 2

latest releases: 4.1.0-rc.0, 4.1.0-beta.1, 4.1.0-beta.0...
pre-release9 years ago

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 the select2 source
    • Set amdLanguagePath to the base path for the select2/i18n source

New events

  • select2:closing to complement select2:opening
  • select2:select to complement select2:unselect

Breaking changes

  • The default value of the width option has been changed from style to resolve.
  • The copy value for the width option has been renamed to style.

Removed events

  • select2-highlight
  • select2-loaded
  • select2-focus - Use the native focus event instead
  • select2-blur - Use the native blur event instead
  • All extra properties of change have been removed
    • val - Use $element.val() instead
    • removed - Use the select2:unselect event instead
    • added - Use the select2-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

Don't miss a new select2 release

NewReleases is sending notifications on new releases.