Skip to content

Commit

Permalink
Fix selectionCssClass not working in defaults (select2#5847)
Browse files Browse the repository at this point in the history
There was a bug in the 4.1.0-beta.0 release which resulted in the
`selectionCssClass` not being functional. This was because the
defaults had not been updated to support this option despite the
documentation and the release notes claiming it was supported.
  • Loading branch information
kevin-brown authored May 1, 2020
1 parent 181170f commit e1f160e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/js/select2/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ define([
);
}

if (
options.dropdownCssClass != null ||
options.dropdownCss != null ||
options.adaptDropdownCssClass != null
) {
if (options.dropdownCssClass != null) {
options.dropdownAdapter = Utils.Decorate(
options.dropdownAdapter,
DropdownCSS
Expand Down Expand Up @@ -195,11 +191,7 @@ define([
);
}

if (
options.containerCssClass != null ||
options.containerCss != null ||
options.adaptContainerCssClass != null
) {
if (options.selectionCssClass != null) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
SelectionCSS
Expand Down

0 comments on commit e1f160e

Please sign in to comment.