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