Ant-design: checkboxgroup doesn't rerender if value is set by form.setFieldsValue

Created on 14 Feb 2017  ·  3Comments  ·  Source: ant-design/ant-design

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

Usage

Most helpful comment

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(提问的智慧).

All 3 comments

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(提问的智慧).

Thanks for the reply and sorry for the misusage

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shivekkhurana picture shivekkhurana  ·  3Comments

PeteAndersen picture PeteAndersen  ·  3Comments

yangbin1994 picture yangbin1994  ·  3Comments

longzb picture longzb  ·  3Comments

Orbyt picture Orbyt  ·  3Comments