aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/components')
-rw-r--r--viewer/src/components/LdTagInput.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue
index 71131e6..7c9981f 100644
--- a/viewer/src/components/LdTagInput.vue
+++ b/viewer/src/components/LdTagInput.vue
@@ -42,6 +42,7 @@
42<script lang="ts"> 42<script lang="ts">
43import { Component, Vue } from "vue-property-decorator"; 43import { Component, Vue } from "vue-property-decorator";
44import { Operation } from "@/@types/tag/Operation"; 44import { Operation } from "@/@types/tag/Operation";
45import Tools from "@/tools";
45 46
46@Component 47@Component
47export default class LdTagInput extends Vue { 48export default class LdTagInput extends Vue {
@@ -92,18 +93,20 @@ export default class LdTagInput extends Vue {
92 category: string, 93 category: string,
93 disambiguation: string 94 disambiguation: string
94 ): Tag.Search[] { 95 ): Tag.Search[] {
96 disambiguation = Tools.normalize(disambiguation);
95 return Object.values(tags) 97 return Object.values(tags)
96 .filter(node => node.tag.includes(category)) 98 .filter(node => node.tag.includes(category))
97 .flatMap(node => 99 .flatMap(node =>
98 Object.values(node.children) 100 Object.values(node.children)
99 .filter(child => child.tag.includes(disambiguation)) 101 .filter(child => child.tagfiltered.includes(disambiguation))
100 .map(child => ({ ...child, parent: node, operation, display: `${operation}${node.tag}:${child.tag}` })) 102 .map(child => ({ ...child, parent: node, operation, display: `${operation}${node.tag}:${child.tag}` }))
101 ); 103 );
102 } 104 }
103 105
104 searchTagsFromFilter(tags: Tag.Index, operation: Operation, filter: string): Tag.Search[] { 106 searchTagsFromFilter(tags: Tag.Index, operation: Operation, filter: string): Tag.Search[] {
107 filter = Tools.normalize(filter);
105 return Object.values(tags) 108 return Object.values(tags)
106 .filter(node => node.tag.includes(filter)) 109 .filter(node => node.tagfiltered.includes(filter))
107 .map(node => ({ ...node, operation, display: `${operation}${node.tag}` })); 110 .map(node => ({ ...node, operation, display: `${operation}${node.tag}` }));
108 } 111 }
109 112