Skip to content

Commit ecad2fd

Browse files
committed
fix(Select): placeholder not displayed when v-model:value initialized with empty string
1 parent bbb7670 commit ecad2fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/vc-select/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export default defineComponent({
207207
// ========================= Wrap Value =========================
208208
const convert2LabelValues = (draftValues: DraftValueType) => {
209209
// Convert to array
210-
const valueList = toArray(draftValues);
210+
const valueList = draftValues !== '' ? toArray(draftValues) : [];
211211

212212
// Convert to labelInValue type
213213
return valueList.map(val => {

0 commit comments

Comments
 (0)