mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
Fixes https://github.com/chatwoot/chatwoot/issues/8436 Fixes https://github.com/chatwoot/chatwoot/issues/9767 Fixes https://github.com/chatwoot/chatwoot/issues/10156 Fixes https://github.com/chatwoot/chatwoot/issues/6031 Fixes https://github.com/chatwoot/chatwoot/issues/5696 Fixes https://github.com/chatwoot/chatwoot/issues/9250 Fixes https://github.com/chatwoot/chatwoot/issues/9762 --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
52 lines
1.3 KiB
Vue
52 lines
1.3 KiB
Vue
<script setup>
|
|
import { defineEmits } from 'vue';
|
|
defineProps({
|
|
inputValue: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
inputPlaceholder: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
showClearFilter: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
});
|
|
|
|
const emit = defineEmits(['input', 'remove']);
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="flex items-center justify-between h-10 min-h-[40px] sticky top-0 bg-white z-10 dark:bg-slate-800 gap-2 px-3 border-b rounded-t-xl border-slate-50 dark:border-slate-700"
|
|
>
|
|
<div class="flex items-center w-full gap-2" @keyup.space.prevent>
|
|
<fluent-icon
|
|
icon="search"
|
|
size="16"
|
|
class="text-slate-400 dark:text-slate-400 flex-shrink-0"
|
|
/>
|
|
<input
|
|
type="text"
|
|
class="w-full mb-0 text-sm bg-white dark:bg-slate-800 text-slate-800 dark:text-slate-75 reset-base"
|
|
:placeholder="inputPlaceholder"
|
|
:value="inputValue"
|
|
@input="emit('input', $event.target.value)"
|
|
/>
|
|
</div>
|
|
<!-- Clear filter button -->
|
|
<woot-button
|
|
v-if="!inputValue && showClearFilter"
|
|
size="small"
|
|
variant="clear"
|
|
color-scheme="primary"
|
|
class="!px-1 !py-1.5"
|
|
@click="emit('remove')"
|
|
>
|
|
{{ $t('REPORT.FILTER_ACTIONS.CLEAR_FILTER') }}
|
|
</woot-button>
|
|
</div>
|
|
</template>
|