SELECT: hide clear button when options is empty in Dropdown #6084
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
Hi!
Put a SELECT component with "showClear" option, link its options to a collection that is a react state. Let the user select a value. Then clear the options collection. The Dropdown component will show no value but the clear icon ("X") will still stay visible.
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-cnd4hj?file=src%2FApp.vue
PrimeVue version
4.0.0
Vue version
4.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
Add a SELECT component that has its options filled dynamically
Choose a value in the Select component
Reset state linked to the options of the Dropdown
The Dropdown will be repainted without a selected value (correct) but the clear icon will still be visibile (wrong behaviour)
Expected behavior
If you programmatically empties the values of the Dropdown, if previously visible the Clear icon should disappear
The text was updated successfully, but these errors were encountered: