Etemplate: Fix read-only selectAccount would always add new values causing doubles

This commit is contained in:
nathangray 2020-12-15 09:41:02 -07:00
parent ac100e4424
commit c0072bc0eb
2 changed files with 4 additions and 8 deletions

View File

@ -670,10 +670,8 @@ var et2_selectAccount_ro = /** @class */ (function (_super) {
.off(); .off();
return; return;
} }
// Don't make it look like a link // Empty it before we fill it
jQuery('li', this.list).removeClass("et2_link et2_link_string") jQuery('li', this.list).remove();
// No clicks either
.off();
var found = false; var found = false;
if (this.options.select_options && !jQuery.isEmptyObject(this.options.select_options) || this.options.empty_label) { if (this.options.select_options && !jQuery.isEmptyObject(this.options.select_options) || this.options.empty_label) {
if (!_value) { if (!_value) {

View File

@ -837,10 +837,8 @@ export class et2_selectAccount_ro extends et2_link_string
return; return;
} }
// Don't make it look like a link // Empty it before we fill it
jQuery('li',this.list).removeClass("et2_link et2_link_string") jQuery('li',this.list).remove();
// No clicks either
.off();
let found = false; let found = false;
if(this.options.select_options && !jQuery.isEmptyObject(this.options.select_options) || this.options.empty_label) if(this.options.select_options && !jQuery.isEmptyObject(this.options.select_options) || this.options.empty_label)