Skip to content

Commit

Permalink
lookup remove button.
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj-webkul committed Aug 20, 2024
1 parent 02cd16c commit b1a4aee
Showing 1 changed file with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,22 @@ class="!mb-2 w-full rounded border border-gray-200 px-2.5 py-2 text-sm font-norm
/>
<!-- Search Icon (absolute positioned) -->
<span class="absolute inset-y-0 right-0 flex items-center pr-3">
<span class="absolute bottom-1 top-2 right-0 flex items-center pr-3">
<div class="flex items-center justify-center space-x-1">
<!-- Loader (optional, based on condition) -->
<i
v-if="entityId && ! isSearching"
class="icon-cross-large cursor-pointer text-2xl"
@click="remove"
></i>
<!-- Loader (optional, based on condition) -->
<div
class="relative"
v-if="isSearching"
>
<x-admin::spinner />
</div>
<!-- Search Icon -->
<i class="fas fa-search text-gray-500"></i>
</div>
</span>
</div>
Expand Down Expand Up @@ -222,6 +226,18 @@ class="px-4 py-2 text-center text-gray-500"
this.showPopup = false;
}
},
remove() {
this.entityId = null;
this.selectedItem = null;
this.searchTerm = '';
this.searchedResults = [];
this.$emit('lookup-removed');
}
}
});
</script>
Expand Down

0 comments on commit b1a4aee

Please sign in to comment.