Skip to content

Commit 9549dc9

Browse files
committed
when to show search phrase lookup dropdown
1 parent 2ba0c9f commit 9549dc9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/Form/fields/FieldAffiliations.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,11 @@ const closeAddMode = function () {
406406
newAffiliationPending.value = {};
407407
};
408408
const showSearchResults = computed(() => {
409-
return searchPhrase.value.length > 0 || apiResponse.value.length > 0;
409+
return (
410+
(searchPhrase.value.length > 0 && apiResponse.value.length > 0) ||
411+
(searchPhrase.value.length > 0 && apiResponse.value.length === 0) ||
412+
!(searchPhrase.value.length === 0)
413+
);
410414
});
411415
const toggleEditMode = function (index) {
412416
if (indexEditMode.value === index) {

0 commit comments

Comments
 (0)