summaryrefslogtreecommitdiffstats
path: root/src/components/Properties/PropertySelect.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Properties/PropertySelect.vue')
-rw-r--r--src/components/Properties/PropertySelect.vue10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/Properties/PropertySelect.vue b/src/components/Properties/PropertySelect.vue
index 0f54d507..ec8dc517 100644
--- a/src/components/Properties/PropertySelect.vue
+++ b/src/components/Properties/PropertySelect.vue
@@ -92,7 +92,15 @@ export default {
// matching value to the options we provide
matchedOptions: {
get() {
- let selected = this.propModel.options.find(option => option.id === this.localValue)
+ // match lowercase as well
+ let selected = this.propModel.options.find(option => option.id === this.localValue
+ || option.id === this.localValue.toLowerCase())
+
+ // if the model provided a custom match fallback, use it
+ if (!selected && this.propModel.greedyMatch) {
+ selected = this.propModel.greedyMatch(this.localValue, this.propModel.options)
+ }
+
// properly display array as a string
if (Array.isArray(this.localValue)) {
return selected || {