Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug report] the checkbox component cannot use the check property to control the state #2046

Closed
lchtao26 opened this issue May 23, 2021 · 4 comments
Assignees
Labels
Project::Bug Something isn't working

Comments

@lchtao26
Copy link

Element Plus version

1.0.2-beta.44

OS/Browsers version

chrome85

Vue version

3.1.0-beta.3

Reproduction Link

https://codepen.io/lchtao26/pen/eYvvqPw

Steps to reproduce

不能被checked属性改变状态

What is Expected?

checked属性能改变checkbox的状态

What is actually happening?

checked属性不能改变checkbox的状态

@element-bot element-bot changed the title [Bug Report] Checkbox组件无法使用check属性控制状态 [bug report] the checkbox component cannot use the check property to control the state May 23, 2021
@element-bot
Copy link
Member

Translation of this issue:

Element Plus version

1.0.2-beta.44

OS/Browsers version

chrome85

Vue version

3.1.0-beta.3

Reproduction Link

https://codepen.io/lchtao26/pen/eYvvqPw

Steps to reproduce

< El checkbox: checked = "true" > the state cannot be changed by the checked attribute < / El checkbox >

What is Expected?

The checked property can change the state of the checkbox

What is actually happening?

The checked property cannot change the state of the checkbox

@jw-foss
Copy link
Member

jw-foss commented May 24, 2021

Yeah, all form components seem like only take v-model or model-value as input to control the form value, like radio button, checkboxes, select, etc.

@jw-foss
Copy link
Member

jw-foss commented May 24, 2021

If you tried to do single binding, use model-value instead.

@jw-foss
Copy link
Member

jw-foss commented May 24, 2021

Or maybe this is something that we can optimize with, for temporary fix, use model-value istead.

@jw-foss jw-foss self-assigned this May 25, 2021
@jw-foss jw-foss added the Project::Bug Something isn't working label May 25, 2021
msidolphin pushed a commit to msidolphin/element-plus that referenced this issue Jun 1, 2021
msidolphin pushed a commit to msidolphin/element-plus that referenced this issue Jun 3, 2021
Ryan2128 pushed a commit that referenced this issue Jun 14, 2021
)

Co-authored-by: yangyu8 <yangyu8@kingsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Project::Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants