From bff1ecf4aaaca6fea95ec2e5d1b44f70b4b7a56b Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Tue, 9 Nov 2021 13:00:07 -0400 Subject: [PATCH] Fix value is alias of item --- src/components/FormSelectList.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/FormSelectList.vue b/src/components/FormSelectList.vue index ff0d17df..d46334b2 100644 --- a/src/components/FormSelectList.vue +++ b/src/components/FormSelectList.vue @@ -162,7 +162,17 @@ * @param {*|*[]} list, array of objects */ transformOptions(list) { - const suffix = this.options.key; + let suffix; + if (this.options.key && this.options.key.startsWith('value.')) { + // points a property of the item + suffix = this.options.key.substr(6); + } else if (this.options.key==='value') { + // points to item itself + suffix = ''; + } else { + // points a property of the item + suffix = this.options.key; + } let resultList = []; list.forEach(item => {