Skip to content

Commit 32a1c25

Browse files
committed
lookup remove button.
1 parent 6ec171e commit 32a1c25

File tree

1 file changed

+20
-4
lines changed
  • packages/Webkul/Admin/src/Resources/views/components/attributes/edit

1 file changed

+20
-4
lines changed

packages/Webkul/Admin/src/Resources/views/components/attributes/edit/lookup.blade.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,22 @@ class="!mb-2 w-full rounded border border-gray-200 px-2.5 py-2 text-sm font-norm
7070
/>
7171
7272
<!-- Search Icon (absolute positioned) -->
73-
<span class="absolute inset-y-0 right-0 flex items-center pr-3">
73+
<span class="absolute bottom-1 top-2 right-0 flex items-center pr-3">
7474
<div class="flex items-center justify-center space-x-1">
75+
<!-- Loader (optional, based on condition) -->
76+
<i
77+
v-if="entityId && ! isSearching"
78+
class="icon-cross-large cursor-pointer text-2xl"
79+
@click="remove"
80+
></i>
81+
7582
<!-- Loader (optional, based on condition) -->
7683
<div
7784
class="relative"
7885
v-if="isSearching"
7986
>
8087
<x-admin::spinner />
8188
</div>
82-
83-
<!-- Search Icon -->
84-
<i class="fas fa-search text-gray-500"></i>
8589
</div>
8690
</span>
8791
</div>
@@ -222,6 +226,18 @@ class="px-4 py-2 text-center text-gray-500"
222226
this.showPopup = false;
223227
}
224228
},
229+
230+
remove() {
231+
this.entityId = null;
232+
233+
this.selectedItem = null;
234+
235+
this.searchTerm = '';
236+
237+
this.searchedResults = [];
238+
239+
this.$emit('lookup-removed');
240+
}
225241
}
226242
});
227243
</script>

0 commit comments

Comments
 (0)