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

fix: Change type of Popconfirm props: okButtonProps to ButtonProps #29928

Merged

Conversation

IggsGrey
Copy link
Contributor

@IggsGrey IggsGrey commented Mar 28, 2021

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

According to the Popconfirm API docs the type of the type of the props okButtonProps and cancelButtonProps is ButtonProps. In the actual code however it is was typed as NativeButtonProps causing type errors when using ButtonProps like href

Error Screenshot

To solve this issue, the types of okButtonProps and cancelButtonProps have been changed to ButtonProps

📝 Changelog

Language Changelog
🇺🇸 English Fix type error in Popconfirm
🇨🇳 Chinese 修复Popconfirm中的类型错误

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

According to the Popconfirm API docs the type of the type of the props okButtonProps and cancelButtonProps is ButtonProps In the actual code however it is was typed as NativeButtonProps causing type errors when using ButtonProps like 'href'
@github-actions
Copy link
Contributor

github-actions bot commented Mar 28, 2021

@codecov
Copy link

codecov bot commented Mar 28, 2021

Codecov Report

Merging #29928 (463f24a) into master (0774436) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 463f24a differs from pull request most recent head d5a71cc. Consider uploading reports for the commit d5a71cc to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##            master    #29928    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          397       397            
  Lines         7666      7519   -147     
  Branches      2160      2100    -60     
==========================================
- Hits          7666      7519   -147     
Impacted Files Coverage Δ
components/carousel/index.tsx 100.00% <ø> (ø)
components/date-picker/locale/sv_SE.tsx 100.00% <ø> (ø)
components/popconfirm/index.tsx 100.00% <ø> (ø)
components/descriptions/Cell.tsx 100.00% <100.00%> (ø)
components/locale/fr_FR.tsx 100.00% <100.00%> (ø)
components/locale/sv_SE.tsx 100.00% <100.00%> (ø)
components/table/hooks/useSelection.tsx 100.00% <100.00%> (ø)
components/tabs/index.tsx 100.00% <100.00%> (ø)
components/upload/Upload.tsx 100.00% <100.00%> (ø)
... and 1 more

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 0774436...d5a71cc. Read the comment docs.

@afc163
Copy link
Member

afc163 commented Mar 29, 2021

CI failed

@IggsGrey
Copy link
Contributor Author

IggsGrey commented Mar 30, 2021

CI failed

Cl -> Changelog? I think that happened because i didn't fill out the Chinese part and that's also because can't speak Chinese. Can you help out?

No, Some checks were not successful. Pls fix them.

@IggsGrey IggsGrey changed the title Change type of Popconfirm props: okButtonProps to ButtonProps fix: Change type of Popconfirm props: okButtonProps to ButtonProps Mar 30, 2021
@IggsGrey
Copy link
Contributor Author

CI failed

Cl -> Changelog? I think that happened because i didn't fill out the Chinese part and that's also because can't speak Chinese. Can you help out?

No, Some checks were not successful. Pls fix them.

All tests passing now

@afc163 afc163 merged commit e32c881 into ant-design:master Mar 31, 2021
gepd pushed a commit to gepd/ant-design that referenced this pull request Apr 1, 2021
…nt-design#29928)

* Change type of Popconfirm props: okButtonProps to ButtonProps

According to the Popconfirm API docs the type of the type of the props okButtonProps and cancelButtonProps is ButtonProps In the actual code however it is was typed as NativeButtonProps causing type errors when using ButtonProps like 'href'

* fix: Remove unused NativeButtonProps
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

Successfully merging this pull request may close these issues.

2 participants