Dropdown list clear button and filter together causes the clear button to disappear instantly

When show showClearButton="true" and allowFiltering="true", the clear button disappears immediately after opening the dropdown: https://imgur.com/a/eQWZzd1.

Code to reproduce:

<script setup lang="ts">
import {DropDownListComponent as EjsDropdownlist} from "@syncfusion/ej2-vue-dropdowns";
const ds = ['Option 1', 'Option 2', 'Option 3'];
</script>


<template>
  <div class="w-40">
    <ejs-dropdownlist :dataSource="ds" :showClearButton="true" :allowFiltering="true" placeholder="Select.." />
  </div>
</template>


This seems to be due to the filter bar stealing focus from the main dropdown (which is expected behaviour), but I think this is still a bug - the clear button should still show.


1 Reply

KP Kokila Poovendran Syncfusion Team August 4, 2023 04:23 PM UTC

Hi Brad Sullivan,


Thank you for reaching out to us with your query.


After carefully reviewing your concern and the provided code, we can confirm that the behavior you are experiencing is not a bug. When the dropdown is opened, the focus is moved to the filtered textbox as part of the expected behavior. As a result, the clear button disappears in this situation.


If you have any further questions or need any assistance, please let us know.


Regards,

Kokila Poovendran.


Loader.
Up arrow icon