-
-
Notifications
You must be signed in to change notification settings - Fork 47.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #15162 #15181
fix #15162 #15181
Conversation
Deploy preview for ant-design ready! Built with commit ab71179 |
You don't need to close old pull request and create new one, just commit and push to the same branch. |
Thank you, I just learnt how to do it. |
You can checkout in your mechine intead of updating from github online editor. |
Codecov Report
@@ Coverage Diff @@
## master #15181 +/- ##
==========================================
- Coverage 93.4% 93.33% -0.08%
==========================================
Files 249 249
Lines 6672 6672
Branches 1946 1958 +12
==========================================
- Hits 6232 6227 -5
- Misses 437 444 +7
+ Partials 3 1 -2
Continue to review full report at Codecov.
|
Yes, I thought it was just a little fix, but I should be more careful. |
components/layout/layout.tsx
Outdated
{children} | ||
</CustomElement> | ||
); | ||
return React.createElement(tagName!, { className: classString, ...others }, children); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not a perfect fix, can we avoid non-null assertion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is safe enough to do that assertion. The end-users either can provide a valid tagName
or don't provide anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it does not affect end-users, but it's unsafe to the antd itself codebase.
I'm ok for this quick fix. But it would be better if we could not use the non-null assertion.
First of all, thank you for your contribution! 馃槃
New feature please send pull request to feature branch, and rest to master branch.
Pull request will be merged after one of collaborators approve.
Please makes sure that these form are filled before submitting your pull request, thank you!
馃 This is a ...
馃懟 What's the background and how to resolve it?
close #15162
For
Layout
component, there is no need to providetagName
property, but in TypeScript environment, it is required.馃挕 Solution
List final API implementation and usage sample.
GIF or snapshot should be provided if includes UI/interactive modification.
Just fix
tagName
totagName?
, to be optional.馃摑 Changelog description
English description
Chinese description (optional)
There is no potential break changes or other risks, just a little fix.
鈽戯笍 Self Check before Merge