Skip to content

Commit 8dccf88

Browse files
Merge pull request #297 from ProcessMaker/bugfix/ticket-1205-A
Fix mustache replacement in SelectLists
2 parents c528936 + bff1ecf commit 8dccf88

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/FormSelectList.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,17 @@
162162
* @param {*|*[]} list, array of objects
163163
*/
164164
transformOptions(list) {
165-
const suffix = this.options.key;
165+
let suffix;
166+
if (this.options.key && this.options.key.startsWith('value.')) {
167+
// points a property of the item
168+
suffix = this.options.key.substr(6);
169+
} else if (this.options.key==='value') {
170+
// points to item itself
171+
suffix = '';
172+
} else {
173+
// points a property of the item
174+
suffix = this.options.key;
175+
}
166176
let resultList = [];
167177
168178
list.forEach(item => {

0 commit comments

Comments
 (0)