Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-86961hrm5: Fix bubbling up of keydown events when typing numbers into concept picker #216

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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