Skip to content
Snippets Groups Projects
Commit d50af20e authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Fix events on language change

parent 203ceaaf
Branches
No related tags found
No related merge requests found
......@@ -61,7 +61,7 @@ class PersonSelect extends VPULitElementJQuery {
/**
* Initializes the Select2 selector
*/
initSelect2() {
initSelect2(ignorePreset = false) {
const that = this;
const $this = $(this);
let lastResult = {};
......@@ -148,7 +148,7 @@ class PersonSelect extends VPULitElementJQuery {
});
// preset a person
if (this.value !== '') {
if (!ignorePreset && this.value !== '') {
const apiUrl = this.entryPointUrl + this.value;
fetch(apiUrl, {
......@@ -189,7 +189,7 @@ class PersonSelect extends VPULitElementJQuery {
if (this.$select !== null && this.$select.hasClass("select2-hidden-accessible")) {
// no other way to set an other language at runtime did work
this.initSelect2();
this.initSelect2(true);
}
break;
case "value":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment