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

Form表单中Switch回显问题 #111

Open
1 task
ohhusr opened this issue Sep 21, 2023 · 0 comments
Open
1 task

Form表单中Switch回显问题 #111

ohhusr opened this issue Sep 21, 2023 · 0 comments

Comments

@ohhusr
Copy link

ohhusr commented Sep 21, 2023

Basic Info

  • Package Name And Version: [email protected]
  • Framework version: 17.0.0
  • Browser: chrome117.0.0.0
<Modal>
<Form
          form={form}
          labelCol={{
            style: { flexBasis: 90 },
          }}
          wrapperCol={{
            style: { flexBasis: 'calc(100% - 90px)' },
          }}
        >
          ...
          <FormItem label={t['menu.form.visible']} field='visible' rules={[{ required: true }]} extra={form.getFieldValue('visible')}>
            <Switch />
          </FormItem>
</Form>
</Modal>

form.setFieldsValue(record)后,打开弹窗,Form表单中Switch不回显,审查元素发现,这个button元素的value="true",但是class和aria-checked不对,如图
有问题的:
image

点击完正确打开的:
image

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

No branches or pull requests

1 participant