Skip to content

Commit

Permalink
when to show search phrase lookup dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
GaziYucel committed Nov 15, 2024
1 parent 2ba0c9f commit 9549dc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Form/fields/FieldAffiliations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,11 @@ const closeAddMode = function () {
newAffiliationPending.value = {};
};
const showSearchResults = computed(() => {
return searchPhrase.value.length > 0 || apiResponse.value.length > 0;
return (
(searchPhrase.value.length > 0 && apiResponse.value.length > 0) ||
(searchPhrase.value.length > 0 && apiResponse.value.length === 0) ||
!(searchPhrase.value.length === 0)
);
});
const toggleEditMode = function (index) {
if (indexEditMode.value === index) {
Expand Down

0 comments on commit 9549dc9

Please sign in to comment.