Fixed opening issue
This fixes an issue where the data set would not be queried when the dropdown was opened.
This commit is contained in:
parent
28f9cae5d7
commit
8d35d5e416
10
dist/js/select2.amd.full.js
vendored
10
dist/js/select2.amd.full.js
vendored
@ -4159,14 +4159,14 @@ define('select2/core',[
|
||||
|
||||
evt.preventDefault();
|
||||
} else if (key === KEYS.ESC || key === KEYS.TAB) {
|
||||
self.trigger('close');
|
||||
self.close();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
} else {
|
||||
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
||||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
|
||||
self.trigger('open');
|
||||
self.open();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
@ -4179,7 +4179,7 @@ define('select2/core',[
|
||||
|
||||
if (this.options.get('disabled')) {
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
}
|
||||
|
||||
this.trigger('disable');
|
||||
@ -4227,9 +4227,9 @@ define('select2/core',[
|
||||
}
|
||||
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
} else {
|
||||
this.trigger('open');
|
||||
this.open();
|
||||
}
|
||||
};
|
||||
|
||||
|
10
dist/js/select2.amd.js
vendored
10
dist/js/select2.amd.js
vendored
@ -4159,14 +4159,14 @@ define('select2/core',[
|
||||
|
||||
evt.preventDefault();
|
||||
} else if (key === KEYS.ESC || key === KEYS.TAB) {
|
||||
self.trigger('close');
|
||||
self.close();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
} else {
|
||||
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
||||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
|
||||
self.trigger('open');
|
||||
self.open();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
@ -4179,7 +4179,7 @@ define('select2/core',[
|
||||
|
||||
if (this.options.get('disabled')) {
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
}
|
||||
|
||||
this.trigger('disable');
|
||||
@ -4227,9 +4227,9 @@ define('select2/core',[
|
||||
}
|
||||
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
} else {
|
||||
this.trigger('open');
|
||||
this.open();
|
||||
}
|
||||
};
|
||||
|
||||
|
10
dist/js/select2.full.js
vendored
10
dist/js/select2.full.js
vendored
@ -13694,14 +13694,14 @@ define('select2/core',[
|
||||
|
||||
evt.preventDefault();
|
||||
} else if (key === KEYS.ESC || key === KEYS.TAB) {
|
||||
self.trigger('close');
|
||||
self.close();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
} else {
|
||||
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
||||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
|
||||
self.trigger('open');
|
||||
self.open();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
@ -13714,7 +13714,7 @@ define('select2/core',[
|
||||
|
||||
if (this.options.get('disabled')) {
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
}
|
||||
|
||||
this.trigger('disable');
|
||||
@ -13762,9 +13762,9 @@ define('select2/core',[
|
||||
}
|
||||
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
} else {
|
||||
this.trigger('open');
|
||||
this.open();
|
||||
}
|
||||
};
|
||||
|
||||
|
2
dist/js/select2.full.min.js
vendored
2
dist/js/select2.full.min.js
vendored
File diff suppressed because one or more lines are too long
10
dist/js/select2.js
vendored
10
dist/js/select2.js
vendored
@ -4587,14 +4587,14 @@ define('select2/core',[
|
||||
|
||||
evt.preventDefault();
|
||||
} else if (key === KEYS.ESC || key === KEYS.TAB) {
|
||||
self.trigger('close');
|
||||
self.close();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
} else {
|
||||
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
||||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
|
||||
self.trigger('open');
|
||||
self.open();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
@ -4607,7 +4607,7 @@ define('select2/core',[
|
||||
|
||||
if (this.options.get('disabled')) {
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
}
|
||||
|
||||
this.trigger('disable');
|
||||
@ -4655,9 +4655,9 @@ define('select2/core',[
|
||||
}
|
||||
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
} else {
|
||||
this.trigger('open');
|
||||
this.open();
|
||||
}
|
||||
};
|
||||
|
||||
|
2
dist/js/select2.min.js
vendored
2
dist/js/select2.min.js
vendored
File diff suppressed because one or more lines are too long
@ -413,7 +413,7 @@ $(".js-programmatic-multi-clear").on("click", function () { $exampleMulti.val(nu
|
||||
<script type="text/x-example-code" class="js-code-multiple-limit">
|
||||
$(".js-example-basic-multiple-limit").select2({
|
||||
maximumSelectionLength: 2
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
|
10
src/js/select2/core.js
vendored
10
src/js/select2/core.js
vendored
@ -292,14 +292,14 @@ define([
|
||||
|
||||
evt.preventDefault();
|
||||
} else if (key === KEYS.ESC || key === KEYS.TAB) {
|
||||
self.trigger('close');
|
||||
self.close();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
} else {
|
||||
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
||||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
|
||||
self.trigger('open');
|
||||
self.open();
|
||||
|
||||
evt.preventDefault();
|
||||
}
|
||||
@ -312,7 +312,7 @@ define([
|
||||
|
||||
if (this.options.get('disabled')) {
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
}
|
||||
|
||||
this.trigger('disable');
|
||||
@ -360,9 +360,9 @@ define([
|
||||
}
|
||||
|
||||
if (this.isOpen()) {
|
||||
this.trigger('close');
|
||||
this.close();
|
||||
} else {
|
||||
this.trigger('open');
|
||||
this.open();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user