Skip to content

Commit

Permalink
Leveled up some options
Browse files Browse the repository at this point in the history
  • Loading branch information
zkelo committed Jul 19, 2023
1 parent 4de1d23 commit dfa81c9
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions src/js/select2/defaults.js
Expand Up @@ -176,42 +176,42 @@ define([
} else {
options.selectionAdapter = SingleSelection;
}
}

// Add the placeholder mixin if a placeholder was specified
if (options.placeholder != null) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
Placeholder
);
}

if (options.allowClear) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
AllowClear
);
}
// Add the placeholder mixin if a placeholder was specified
if (options.placeholder != null) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
Placeholder
);
}

if (options.multiple) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
SelectionSearch
);
}
if (options.allowClear) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
AllowClear
);
}

if (options.selectionCssClass != null) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
SelectionCSS
);
}
if (options.multiple) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
SelectionSearch
);
}

if (options.selectionCssClass != null) {
options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
EventRelay
SelectionCSS
);
}

options.selectionAdapter = Utils.Decorate(
options.selectionAdapter,
EventRelay
);

// If the defaults were not previously applied from an element, it is
// possible for the language option to have not been resolved
options.language = this._resolveLanguage(options.language);
Expand Down

0 comments on commit dfa81c9

Please sign in to comment.