ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

a-select placeholder not displayed when v-model:value initialized with empty string

Open parade0393 opened this issue 1 month ago • 0 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

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

parade0393 avatar Oct 27 '25 17:10 parade0393