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

checkboxgroup doesn't rerender if value is set by form.setFieldsValue #4872

Closed
AhmadMayo opened this issue Feb 14, 2017 · 3 comments
Closed
Labels

Comments

@AhmadMayo
Copy link

Environment(required)

  • antd version: 2.7.0
  • OS and its version: ubuntu 16.04
  • Browser and its version: chrome 56.0.2924.87 (64-bit)

What did you do? Please provide steps to re-produce your problem.

Try two set checkboxgroup programmatically

What do you expected?

The value changes and the checkboxes in the value array are checked

What happen?

the checkboxes are not checked

Re-producible online demo

http://codepen.io/anon/pen/Lxqaez?editors=001

@benjycui
Copy link
Contributor

valuePropName of Checkbox.Group should be value instead of checked, see: https://ant.design/components/checkbox/#components-checkbox-demo-group

Ant Design team use GitHub issues to trace bugs or discuss plans of Ant Design. So, please don't ask usage questions here. You can try to ask questions in Stack Overflow or Segment Fault, then apply tag antd and react to your questions.

You should read documentation & FAQ and search issues before ask a question, THX!

It will be better if you read smart questions(提问的智慧).

@AhmadMayo
Copy link
Author

Thanks for the reply and sorry for the misusage

@way2ex
Copy link

way2ex commented Apr 3, 2018

How about adding a clear usage example or note about when to use 'checked' or 'value' ? I have read the document, but I only find this:
image

This is very misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants