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

fix Input type error #9046

Merged
merged 1 commit into from Jan 20, 2018

Conversation

Projects
None yet
2 participants
@Riokai
Contributor

Riokai commented Jan 20, 2018

First of all, thank you for your contribution! :-)

Please makes sure that these checkboxes are checked before submitting your PR, thank you!

  • [✓] Make sure that you propose PR to right branch: bugfix for master, feature for latest active branch feature-x.x.
  • [✓] Make sure that you follow antd's code convention.
  • [✓] Run npm run lint and fix those errors before submitting in order to keep consistent code style.
  • [✓] Rebase before creating a PR to keep commit history clear.
  • [✓] Add some descriptions and refer relative issues for you PR.

Extra checklist:

if isBugFix :

  • Make sure that you add at least one unit test for the bug which you had fixed.
@Riokai

This comment has been minimized.

Contributor

Riokai commented Jan 20, 2018

在 TypeScript 环境下,maxLength 类型为 number,而源码中 propTypes 类型检查为 string,导致无论写 number 还是 string 都会有一方出错。

qq20180120-165416 2x

qq20180120-165445 2x

@afc163

This comment has been minimized.

Member

afc163 commented Jan 20, 2018

PropTypes.oneOfTypes 好了,兼容性也好点。

@codecov

This comment has been minimized.

codecov bot commented Jan 20, 2018

Codecov Report

Merging #9046 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9046   +/-   ##
=======================================
  Coverage   85.23%   85.23%           
=======================================
  Files         195      195           
  Lines        4672     4672           
  Branches     1377     1377           
=======================================
  Hits         3982     3982           
  Misses        690      690
Impacted Files Coverage Δ
components/input/Input.tsx 96.55% <100%> (ø) ⬆️

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 aa9e335...df77ab9. Read the comment docs.

@Riokai

This comment has been minimized.

Contributor

Riokai commented Jan 20, 2018

@afc163 感谢提醒,是我疏忽了,这样改很容易引起现在项目出错,我修改后重新 commit

@Riokai Riokai force-pushed the Riokai:master branch from bdd0e12 to df77ab9 Jan 20, 2018

@afc163 afc163 merged commit d868c5a into ant-design:master Jan 20, 2018

4 checks passed

codecov/patch 100% of diff hit (target 85.23%)
Details
codecov/project 85.23% (+0%) compared to aa9e335
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk No new issues
Details

@afc163 afc163 referenced this pull request Nov 28, 2018

Closed

Remove unused type #13287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment