Skip to content

Commit

Permalink
Merge pull request #216 from CogStack/meta-anno-click-event-bug
Browse files Browse the repository at this point in the history
CU-86961hrm5: Fix bubbling up of keydown events when typing numbers into concept picker
  • Loading branch information
tomolopolis authored Oct 3, 2024
2 parents 47fa649 + 29d9eb8 commit f6d0a76
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions webapp/frontend/src/components/common/ConceptPicker.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<template>
<v-select v-model="selectedCUI" @search="searchCUI"
:inputId="'searchBox'"
:clearSearchOnSelect="true"
:filterable="false"
:appendToBody="true"
:options="searchResults"
:loading="loadingResults"
label="cui"
@open="$emit('picker:opened')"
@close="$emit('picker:closed')">
<template v-slot:no-options="{ search, searching }">
<template v-if="searching">No results found for <em>{{ search }}</em>.
<div @keydown.stop>
<v-select v-model="selectedCUI" @search="searchCUI"
:inputId="'searchBox'"
:clearSearchOnSelect="true"
:filterable="false"
:appendToBody="true"
:options="searchResults"
:loading="loadingResults"
label="cui"
@open="$emit('picker:opened')"
@close="$emit('picker:closed')">
<template v-slot:no-options="{ search, searching }">
<template v-if="searching">No results found for <em>{{ search }}</em>.
</template>
<em v-else style="opacity: 0.5">Start typing to search for a concept.</em>
</template>
<em v-else style="opacity: 0.5">Start typing to search for a concept.</em>
</template>
<template v-slot:option="option">
<span class="select-option">{{option.name}}</span>
<span class="select-option-cui"> - {{option.cui}}</span>
</template>
</v-select>
<template v-slot:option="option">
<span class="select-option">{{option.name}}</span>
<span class="select-option-cui"> - {{option.cui}}</span>
</template>
</v-select>
</div>
</template>

<script>
Expand Down

0 comments on commit f6d0a76

Please sign in to comment.