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

Improved Form component typings #10564

merged 2 commits into from May 17, 2018


None yet
3 participants

bwlt commented May 17, 2018

With this fix you can use HTMLFormElement attributes on Form component
without getting TypeScript errors.

For example this code does not longer produce error for the additional
autoComplete prop:

const myForm = (
  <Form autoComplete="off">

also it includes a better typing with the Input component regarding the onFocus and onBlur handler

Improved Form component typings
With this fix you can use HTMLFormElement attributes on Form component
without getting TypeScript errors.

For example this code does not longer produce error for the additional
`autoComplete` prop:

const myForm = (
  <Form autoComplete="off">

This comment has been minimized.

ant-design-bot commented May 17, 2018

Deploy preview for ant-design ready!

Built with commit b9c1027


This comment has been minimized.

codecov bot commented May 17, 2018

Codecov Report

Merging #10564 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10564   +/-   ##
  Coverage    86.4%    86.4%           
  Files         196      196           
  Lines        4795     4795           
  Branches     1339     1339           
  Hits         4143     4143           
  Misses        649      649           
  Partials        3        3
Impacted Files Coverage Δ
components/form/Form.tsx 95% <ø> (ø) ⬆️
components/input/Input.tsx 96.72% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e0865f...b9c1027. Read the comment docs.

Fix onBlur / onChange typings with Input component
This improvement fix a typing issue incompatibility with
The incompatibility involve [this
where the handler argument is a more specific SyntheticEvent

@afc163 afc163 merged commit 963120f into ant-design:master May 17, 2018

5 checks passed

codecov/patch Coverage not affected when comparing 6e0865f...b9c1027
codecov/project 86.4% remains the same compared to 6e0865f
continuous-integration/travis-ci/pr The Travis CI build passed
deploy/netlify Deploy preview ready!
security/snyk No dependency changes

bors bot added a commit to mozilla/delivery-console that referenced this pull request May 21, 2018

Merge #163
163: Update dependency antd to v3.5.3 r=rehandalal a=renovate[bot]

This Pull Request updates dependency [antd]( from `v3.5.2` to `v3.5.3`

<summary>Release Notes</summary>

### [`v3.5.3`](
[Compare Source](ant-design/ant-design@3.5.2...3.5.3)
- 🐞 Fix `Affix` with offsetTop === 0, value becomes `undefined` problem [#&#8203;10566](`ant-design/ant-design#10566)
- 🐞 Fixed issue with shaded `Input.Group` component shadows[#&#8203;10230](`ant-design/ant-design#10230)
- 🐞 Fixed issue where the `Transfer` component checkbox event fired twice [#&#8203;10480](`ant-design/ant-design#10480)
- 💄 Unifying the name of the variable [12d3046](ant-design/ant-design@12d3046)
- 💄 Fine-tuned the style of `Dropdown` [8e2f72f](ant-design/ant-design@8e2f72f)
- 💄 The components of the Chinese document will now be demonstrated using Chinese language packages. [9b17a94](ant-design/ant-design@9b17a94)
- 💄 The main theme switch was changed to `antd-theme-generato`, thanks to the work of [@&#8203;mzohaibqc].
- TypeScript
  - 🐞 Fixed an issue with the type of gutter attribute in `Row` [b7d508e](ant-design/ant-design@b7d508e)
  - 💄 Improved the `Form` component type [#&#8203;10564](`ant-design/ant-design#10564)
  - 💄 Improved the `Button` and `Tag` types[1ed9fed](ant-design/ant-design@1ed9fed)


- 🐞 修复了 `Affix` 当 `offsetTop === 0`, 值将变为 `undefined` 的问题 [#&#8203;10566](`ant-design/ant-design#10566)
- 🐞 修复了 `Menu` item 中的高亮链接颜色问题 [09d5e36](ant-design/ant-design@09d5e36)
- 🐞 修复了 `Input.Group` 组件阴影被遮盖的问题 [#&#8203;10230](`ant-design/ant-design#10230)
- 🐞 修复了 `Transfer` 组件 checkbox 事件触发两次的问题 [`#10480`](`ant-design/ant-design#10480)
- 💄 统一 less 的变量命名 [12d3046](ant-design/ant-design@12d3046)
- 💄 微调了 `Dropdown` 的样式 [8e2f72f](ant-design/ant-design@8e2f72f)
- 💄 现在中文文档的组件会用中文语言包进行演示。[9b17a94](ant-design/ant-design@9b17a94)
- 💄 主站主题切换 修改为 `antd-theme-generato` ,感谢 [@&#8203;mzohaibqc] 的工作.
- TypeScript
  - 🐞 修复了 `Row` 中 gutter 属性的类型问题 [b7d508e](ant-design/ant-design@b7d508e)
  - 💄 改进了 `Form` 组件类型 [#&#8203;10564](`ant-design/ant-design#10564)
  - 💄 改进了 `Button` 和 `Tag` 类型 [1ed9fed](ant-design/ant-design@1ed9fed)




This PR has been generated by [Renovate Bot](

Co-authored-by: Renovate Bot <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment