diff --git a/api/js/etemplate/Et2Select/Et2Listbox.ts b/api/js/etemplate/Et2Select/Et2Listbox.ts index 1bea8b7c23..835d2c6fae 100644 --- a/api/js/etemplate/Et2Select/Et2Listbox.ts +++ b/api/js/etemplate/Et2Select/Et2Listbox.ts @@ -117,9 +117,13 @@ export class Et2Listbox extends RowLimitedMixin(Et2widgetWithSelectMixin(SlMenu) get value() { - let value = this.getAllItems() - .filter((item) => item.checked) - .map((item) => item.value); + let value = []; + if(this.defaultSlot) + { + value = this.getAllItems() + .filter((item) => item.checked) + .map((item) => item.value); + } return this.multiple ? value : value.pop(); } diff --git a/api/js/etemplate/et2_widget_placeholder.ts b/api/js/etemplate/et2_widget_placeholder.ts index a1116f6431..57b37933d1 100644 --- a/api/js/etemplate/et2_widget_placeholder.ts +++ b/api/js/etemplate/et2_widget_placeholder.ts @@ -136,11 +136,10 @@ export class et2_placeholder_select extends et2_inputWidget content: {app: '', group: '', entry: {}}, sel_options: {app: [], group: []}, modifications: { - outer_box: { entry: { application_list: [] } - } + } }; @@ -156,13 +155,13 @@ export class et2_placeholder_select extends et2_inputWidget data.content.app = data.sel_options.app[0].value; data.content.group = data.sel_options.group[0]?.value; data.content.entry = {app: data.content.app}; - data.modifications.outer_box.entry.application_list = Object.keys(_data); + data.modifications.entry.application_list = Object.keys(_data); // Remove non-app placeholders (user & general) let non_apps = ['user', 'general']; for(let i = 0; i < non_apps.length; i++) { - let index = data.modifications.outer_box.entry.application_list.indexOf(non_apps[i]); - data.modifications.outer_box.entry.application_list.splice(index, 1); + let index = data.modifications.entry.application_list.indexOf(non_apps[i]); + data.modifications.entry.application_list.splice(index, 1); } // callback for dialog diff --git a/api/templates/default/insert_merge_placeholder.xet b/api/templates/default/insert_merge_placeholder.xet index 605965b113..62938e19ea 100644 --- a/api/templates/default/insert_merge_placeholder.xet +++ b/api/templates/default/insert_merge_placeholder.xet @@ -2,18 +2,19 @@