Skip to content

Commit

Permalink
Fix: make tags emit click event instead of search event, as it shoudn…
Browse files Browse the repository at this point in the history
…'t make assumptions
  • Loading branch information
AlexAndBear committed Aug 5, 2024
1 parent ae338fd commit 2992c00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/web-app-app-store/src/components/AppTags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
size="small"
class="oc-text-nowrap"
type="button"
@click="emitSearchTerm(tag)"
@click="emitClick(tag)"
>
<span class="mark-element">{{ tag }}</span>
</oc-tag>
Expand All @@ -24,14 +24,14 @@ export default defineComponent({
required: true
}
},
emits: ['search'],
emits: ['click'],
setup(props, { emit }) {
const emitSearchTerm = (term: string) => {
emit('search', term)
const emitClick = (tagName: string) => {
emit('click', tagName)
}
return {
emitSearchTerm
emitClick
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-app-store/src/components/AppTile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</div>
<p class="oc-my-s mark-element">{{ app.subtitle }}</p>
</div>
<app-tags :app="app" @search="emitSearchTerm" />
<app-tags :app="app" @click="emitSearchTerm" />
<app-actions :app="app" />
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-app-store/src/views/AppDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<div v-if="app.tags">
<h3>{{ $gettext('Tags') }}</h3>
<app-tags :app="app" @search="onTagClicked" />
<app-tags :app="app" @click="onTagClicked" />
</div>
<div v-if="app.authors">
<h3>{{ $gettext('Author') }}</h3>
Expand Down

0 comments on commit 2992c00

Please sign in to comment.