Skip to content

Commit e1f160e

Browse files
authored
Fix selectionCssClass not working in defaults (select2#5847)
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.
1 parent 181170f commit e1f160e

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/js/select2/defaults.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,7 @@ define([
149149
);
150150
}
151151

152-
if (
153-
options.dropdownCssClass != null ||
154-
options.dropdownCss != null ||
155-
options.adaptDropdownCssClass != null
156-
) {
152+
if (options.dropdownCssClass != null) {
157153
options.dropdownAdapter = Utils.Decorate(
158154
options.dropdownAdapter,
159155
DropdownCSS
@@ -195,11 +191,7 @@ define([
195191
);
196192
}
197193

198-
if (
199-
options.containerCssClass != null ||
200-
options.containerCss != null ||
201-
options.adaptContainerCssClass != null
202-
) {
194+
if (options.selectionCssClass != null) {
203195
options.selectionAdapter = Utils.Decorate(
204196
options.selectionAdapter,
205197
SelectionCSS

0 commit comments

Comments
 (0)