Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

select2

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

select2 - npm Package Versions

12

4.0.0

Diff

Changelog

Source

4.0.0

This builds upon the second release candidate, so review all previous release notes before upgrading from previous versions of Select2.

Supported environments

  • jQuery 1.7.2+
  • Modern browsers (Chrome, Firefox, Safari)
  • Internet Explorer 8+

New features

  • Fully compatible with AMD and UMD based loaders.
  • Advanced plugin system that uses custom adapters.
  • Full support for jQuery.noConflict.
  • A <select> is the recommended element and can be used for all options. There is limited backwards-compatible support for the <input> element in full builds.
  • Declarative configuration through data-* attributes
  • Easy to configure theme system and new default theme
  • You can use more specific locales (like en-US) and Select2 will be able to determine what translation files to load.

Breaking changes

  • Select2 now uses the MIT license
  • The full build of Select2 no longer includes jQuery - You must include jQuery separately on your page.
  • Select2 will prevent the inner scrolling of modals (and other scrollable containers) when it is open to prevent the UI from breaking. Read more at the commit.
  • jQuery is no longer listed as a dependency in the bower.json/component.json files.
  • <select> has replaced <input type="hidden" /> for all options (including remote data)
  • The matcher has been revamped to include full context, a compatibility module (select2/compat/matcher) has been created
  • The display always reflects the order data is sent to the server
  • The click mask is no longer the default (again). You can get back the old functionality by wrapping your selectionAdapter with the ClickMask (select2/selection/clickMask) decorator.
  • Select2 no longer stops the propagation of events happening within the dropdown and selection. You can use the StopPropagation modules available in the full builds to prevent this. [https://github.com/select2/select2/commit/8f8140e3b00c5d5bb232455137c4c633d7da4275]
  • The enter key no longer toggles the state of multiple select items in the results, but instead will only select them. Use CTRL + Space instead to toggle the state. [https://github.com/select2/select2/commit/017c20109471fa5b835603faf5dc37f7c2c2ea45]
  • Warnings will now be triggered in the developer console if Select2 detects an unsupported configuration.
Options
  • 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.
Renamed
  • formatSelection -> templateSelection
  • formatResult -> templateResult
  • sortResults -> sorter
  • createSearchChoice -> createTag
  • selectOnBlur -> selectOnClose
  • ajax.jsonpCallback -> ajax.jsonp
  • ajax.results -> ajax.processResults
  • tags: [array,of,data] -> data: [array,of,data], tags: true
  • placeholderOption has been replaced by placeholder.id (placeholder -> placeholder.text)
chrisjbaik
published 3.5.2-browserify •

chrisjbaik
published 3.5.1-browserify-fix •

chrisjbaik
published 3.5.1-browserify •

chrisjbaik
published 3.5.1 •

chrisjbaik
published 3.4.5 •

chrisjbaik
published 3.4.3 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc