Skip to content

Commit 41c3d4c

Browse files
committed
Removed hardcoded class names from $.fn.select2. The code now uses the exports accessible through window.Select2 to instantiate widgets, allowing the environment to replace or extend those classes globally.
1 parent 4eb1370 commit 41c3d4c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3185,7 +3185,7 @@ the specific language governing permissions and limitations under the Apache Lic
31853185
if ("tags" in opts) {opts.multiple = multiple = true;}
31863186
}
31873187

3188-
select2 = multiple ? new MultiSelect2() : new SingleSelect2();
3188+
select2 = multiple ? new window.Select2["class"].multi() : window.Select2["class"].single();
31893189
select2.init(opts);
31903190
} else if (typeof(args[0]) === "string") {
31913191

0 commit comments

Comments
 (0)