chore: change link dropdown component

This commit is contained in:
Muhsin Keloth
2024-05-20 17:05:07 +05:30
parent 6550287f97
commit df0a7a348b
7 changed files with 25 additions and 160 deletions
@@ -19,7 +19,7 @@ const props = defineProps({
default: '',
},
activeFilterId: {
type: Number,
type: [String, Number],
default: null,
},
showClearFilter: {
@@ -28,10 +28,13 @@ const props = defineProps({
},
});
const emits = defineEmits(['on-search']);
const searchTerm = ref('');
const onSearch = value => {
searchTerm.value = value;
emits('on-search', value);
};
const filteredListItems = computed(() => {
@@ -55,7 +58,7 @@ const isFilterActive = id => {
>
<slot name="search">
<dropdown-search
v-if="enableSearch && listItems.length"
v-if="enableSearch"
:input-value="searchTerm"
:input-placeholder="inputPlaceholder"
:show-clear-filter="showClearFilter"