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

[checkbox.group]:jsx 渲染value值 结果与 options 不一致 #2070

Closed
gavin-hao opened this issue Jun 14, 2022 · 0 comments
Closed

[checkbox.group]:jsx 渲染value值 结果与 options 不一致 #2070

gavin-hao opened this issue Jun 14, 2022 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@gavin-hao
Copy link
Contributor

样式不一致

jsx

image

options

image

() => (
  <>
    <Checkbox.Group
      defaultValue={['value2']}
      options={[
        { label: 'Checkbox 1', value: 'value1' },
        { label: 'Checkbox 2', value: 'value2' },
        { label: 'Checkbox 3', value: 'value3', disabled: true },
        { label: 'Checkbox 4', value: 'value4', onChange: (event) => console.log(event.target.checked) },
      ]}
    />
    <Divider />
    <Checkbox.Group
      layout="vertical"
      defaultValue={['value2']}
      // options={[
      //   { label: 'Checkbox 1', value: 'value1' },
      //   { label: 'Checkbox 2', value: 'value2' },
      //   { label: 'Checkbox 3', value: 'value3', disabled: true },
      //   { label: 'Checkbox 4', value: 'value4', onChange: (event) => console.log(event.target.checked) },
      // ]}
    >
      <Checkbox value="value1">Checkbox 1</Checkbox>
      <Checkbox value="value2">Checkbox 2</Checkbox>
      <Checkbox value="value3">Checkbox 3</Checkbox>
      <Checkbox value="value4">Checkbox 4</Checkbox>
    </Checkbox.Group>
  </>
)
@gavin-hao gavin-hao added the 🐛 bug Something isn't working label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants