summaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-15 00:28:32 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-27 08:18:51 +0200
commit677003d1b6f1ebabab6cee32b96ccad8d70ee863 (patch)
tree51fa2d55d8f3bf5fc6aafaa28cde961925ca3220 /src/components
parentf6d17da24eb003dde1deca0883fcc2692d87c3be (diff)
Add TZ & LANG
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/components')
-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 || {