Skip to content

Commit d2cc3bc

Browse files
committed
commit for posterity
1 parent a2abf21 commit d2cc3bc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

LDK/resources/web/LDK/plugin/UserEditableCombo.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,25 @@ Ext4.define('LDK.plugin.UserEditableCombo', {
9898
});
9999

100100
if (this.useBracketsForUnknownValues) {
101+
let innerTpl = 'this.formatLookup(values)';
102+
103+
const innerTplWrap = this.combo?.listConfig?.getInnerTpl();
104+
if (typeof innerTplWrap === 'string') {
105+
innerTpl = innerTplWrap.replaceAll('values', innerTpl);
106+
}
107+
else if (Array.isArray(innerTplWrap)) {
108+
innerTpl = innerTplWrap.map(t => t.replaceAll('values', innerTpl));
109+
}
110+
else {
111+
innerTpl = '{[' + innerTpl + ']}';
112+
}
113+
101114
Ext4.override(combo, {
102115
tpl: Ext4.create('Ext.XTemplate',
103116
'<ul class="x4-list-plain">',
104117
'<tpl for=".">',
105118
'<li role="option" class="x4-boundlist-item">',
106-
'{[this.formatLookup(values)]}',
119+
'' + innerTpl,
107120
'</li>',
108121
'</tpl>',
109122
'</ul>',

0 commit comments

Comments
 (0)