Version
4.2.6
Environment
vue:3.5.22,brower:chrome140.0.7339.208
Reproduction link
https://stackblitz.com/edit/vitejs-vite-h373sqsp?file=src%2FApp.vue
Steps to reproduce
When a-select component's v-model:value is initialized with an empty string '',
the placeholder is not displayed. However, when initialized with undefined or null,
the placeholder displays correctly.
What is expected?
The placeholder should be displayed regardless of whether the initial value is an empty
string, undefined, or null, as they all represent an unselected state from a UX perspective.
What is actually happening?
- When
const value = ref('') - placeholder is not displayed, component width collapses
- When
const value = ref() or ref(undefined) - placeholder is displayed correctly