Skip to content

Select cannot be fully controlled, but Input is possible #4848

@ZenDay

Description

@ZenDay
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.1.4

Environment

OSX Mojave 10.14.6/Chrome 86, Vue 3.0.1

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Select 通过 :value 和 @change 来试图让其受控。

What is expected?

Select 应该与 Input 表现类似,在使用了 :value 和 @change 时完全受控。
Input 如果在 @change 中没有变更绑定的 value 值,展示的仍然是变更前的值

What is actually happening?

@change 并没有变更 value 值的情况下,Select 仍然展示的是变更后的值。


如果这是 select 的特性,我应该如何让 select 完全受控呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions