Skip to content

Commit

Permalink
CU-86961hrm5: Fix bubbling up of keydown events when typing numbers i…
Browse files Browse the repository at this point in the history
…nto concept picker
  • Loading branch information
tomolopolis committed Oct 3, 2024
1 parent e452d64 commit 29d9eb8
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 29d9eb8

Please sign in to comment.