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组件 onchange ts提示错误 #577

Closed
xingyuefeng opened this issue Mar 1, 2022 · 1 comment
Closed

form组件 onchange ts提示错误 #577

xingyuefeng opened this issue Mar 1, 2022 · 1 comment

Comments

@xingyuefeng
Copy link
Member

     <Form
      fields={{
        selectField: {
          children: (
            <Select>
              <Select.Option value="w">Choose an item...</Select.Option>
              <Select.Option value="1">One</Select.Option>
              <Select.Option value="2">Two</Select.Option>
              <Select.Option value="3">Three</Select.Option>
              <Select.Option value="4">Four</Select.Option>
            </Select>
          ),
          onChange: (e => console.log(e.target.value))
        },
      }}
    >
      {({ fields  }) => {
        return (
          <div>
            {fields.selectField}
          </div>
        )
      }}
</Form>

onChange: (e => console.log(e.target.value)) 会提示ts错误 类型“EventTarget”上不存在属性“value”。ts(2339)

@nullptr-z
Copy link
Collaborator

@xingyuefeng 已在v4.13.3版本中修复

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

2 participants