1
0
forked from test/crm

feat: Clear all filter x button

This commit is contained in:
Shariq Ansari 2024-05-17 19:02:51 +05:30
parent 7f10d75354
commit d1d5366c55

View File

@ -1,7 +1,10 @@
<template> <template>
<NestedPopover> <NestedPopover>
<template #target> <template #target>
<Button :label="__('Filter')"> <Button
:label="__('Filter')"
:class="filters?.size ? 'rounded-r-none' : ''"
>
<template #prefix><FilterIcon class="h-4" /></template> <template #prefix><FilterIcon class="h-4" /></template>
<template v-if="filters?.size" #suffix> <template v-if="filters?.size" #suffix>
<div <div
@ -11,6 +14,12 @@
</div> </div>
</template> </template>
</Button> </Button>
<Button
v-if="filters?.size"
class="rounded-l-none border-l"
icon="x"
@click.stop="clearfilter"
/>
</template> </template>
<template #body="{ close }"> <template #body="{ close }">
<div class="my-2 rounded-lg border border-gray-100 bg-white shadow-xl"> <div class="my-2 rounded-lg border border-gray-100 bg-white shadow-xl">