Skip to content

Latest commit

 

History

History
285 lines (232 loc) · 21.2 KB

CHANGELOG.md

File metadata and controls

285 lines (232 loc) · 21.2 KB

Change Log

4.0.6

New features/improvements

  • Add style property to package.json (#5019)
  • Implement clear and clearing events (#5058)

Bug fixes

  • Add ; before beginning of factory wrapper (#5089)
  • Clear tooltip from select2-selection__rendered when selection is cleared (#4640, #4746)
  • Fix keyboard not closing when closing dropdown on iOS 10 (#4680)
  • User-defined types not normalized properly when passed in as data (#4632)
  • Fix "the results could not be loaded" displaying during AJAX request (#4356)

4.0.5

Bug fixes

  • Replace autocapitalize=off with autocapitalize=none (#4994)

Translations

  • Vietnamese: remove an unnecessary quote mark (#5059)
  • Czech: Add missing commas and periods (#5052)
  • Spanish: Update the 'errorLoading' message (#5032)
  • Fix typo in Romanian (#5005)
  • Improve French translation (#4988)
  • Add Pashto translation (ps) (#4960)
  • Add translations for lower and upper Sorbian (dsb and hsb) (#4949)
  • Updates to Slovak (#4915)
  • Fixed Norwegian inputTooShort message (#4817, 4896)
  • Add Afrikaans translation (af) (#4850)
  • Add Bosnian translation (bs) (#4504)

4.0.4

New features / Improvements

Bug fixes

Documentation

  • Github Pages documentation has been deprecated, replaced with https://github.com/select2/docs
  • Add django-autocomplete-light to integrations [#4597]
  • Correct typo in options page [#4389]
  • Correct misspelling in AJAX query parameters example [#4435]
  • "highlight" should be "focus" in focus example [#4441]
  • Correct misspelling in <select> serialization example [#4538]
  • Correct typos in documentation [#4663]

Translations

4.0.3

This is the third bugfix release of Select2 4.0.0. It builds upon the second bugfix release and fixes many common issues.

New features / Improvements

Bug fixes

Documentation

Translations

4.0.2

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.

New features / Improvements

  • Added insertTag option to control the placement of the tags option [#4008]
  • Added handler for AJAX errors [#3501]
  • Added insertTag to control the tag position [#4008]

Bug fixes

Documentation

Translations

4.0.1

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.

New features / improvements

Bug fixes

Design

  • Fixed original <select> not always being hidden correctly in some cases [#3301]
  • Fix potential issue with Bootstrap's gradients in Internet Explorer [#3307]
  • Improve compatibility with Zurb Foundation [#3290]
  • Remove padding on mobile safari search field in multiple selects [#3605]
  • Fix the clear button appearing beneath long text [#3306]
  • Migrate the CSS classes for the "Loading more results" message to BEM [#3889]
  • Fix inline search not displaying properly in Safari [#3459]

Documentation

  • New documentation theme designed by @fk [#3376, #3467, #3488]
  • Update ajax example to reflect pagination [#3357]
  • Fix incorrect option name in maxiumSelectionLength example [#3454]
  • Fix typos in the disabled mode/results examples [#3665]
  • Fix Option parameters in the 4.0 announcement [#3547]
  • Fix invalid JSON in the tags example within the 4.0 announcement [#3637]

Translations

  • Added Cyrillic variant of the Serbian language [#3943]
  • Corrected Thai "no results found" translation [#3782]
  • Swapped the inputTooLong and inputTooShort messages in the Galician translation [#3291]
  • Fix improper grammar in Dutch translation [#3692]
  • Add Japanese translation [#3477]
  • Polish translation: Fixed typo in maximum selected message [#3587]
  • Add Malay translation [#3635]
  • Add errorLoading for Indonesian translation [#3635]
  • Correct grammar issues in Hebrew translation [#3911]
  • Add errorLoading for Danish translation [#3870]
  • Add Arabic translation [#3859]

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

Breaking changes

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)
  • formatNoMatches -> language.noMatches
  • formatSearching -> language.searching
  • formatInputTooShort -> language.inputTooShort
  • formatInputTooLong -> language.inputTooLong
  • formatAjaxError -> language.errorLoading
  • formatLoading -> language.loadingMore
  • formatSelectionTooBig -> language.maximumSelected
Deprecated/Removed
  • initSelection - This is no longer needed with <select> tags. Limited backwards compatibility in the full build.
  • id - Data objects should now always have id and text attributes that are strings, use $.map when migrating
  • query - Use a custom data adapter instead. Limited backwards compatibility in the full build.
  • ajax.params - All parameters passed to ajax will be passed to the AJAX data transport function

Methods

Renamed
  • .select2("val", [value]) -> .val([value])
  • .select2("enable", !disabled) -> .prop("disabled", disabled)
Removed
  • .select2("onSortStart") and .select2("onSortEnd") - A custom selection adapter should be created instead
  • .select2("data", data) - Create the <option> tags for the objects that you would like to set, and set the .val to select them
  • .select2("readonly") - There is no way to make a <select> element read-only, disable it instead

Events

New
  • select2:closing is triggered before the dropdown is closed
  • select2:select is triggered when an option is selected
Renamed
  • select2-close is now select2:close
  • select2-open is now select2:open
  • select2-opening is now select2:opening
  • select2-selecting is now select2:selecting
  • select2-removed is now select2:unselect
  • select2-removing is now select2:unselecting
Removed
  • select2-clearing has been removed in favor of select2:unselecting
  • select2-highlight
  • select2-loaded
  • select2-focus - Use the native focus event instead
  • select2-blur - Use the native blur event instead
  • All extra properties from the change event were removed
    • val can be retrieved with $element.val() instead
    • added can be retrieved by listening to select2:select
    • removed can be retrieved by listening to select2:unselect