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: TextArea warning with React 16.13 #21703
Conversation
? // React will warning when mix `overflow` & `overflowY`. | ||
// We need to define this separately. | ||
{ overflowX: 'hidden', overflowY: 'hidden' } | ||
: null), |
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.
这能加用例么
Codecov Report
@@ Coverage Diff @@
## master #21703 +/- ##
==========================================
+ Coverage 97.88% 97.88% +<.01%
==========================================
Files 305 305
Lines 6999 7001 +2
Branches 1922 1889 -33
==========================================
+ Hits 6851 6853 +2
Misses 148 148
Continue to review full report at Codecov.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ae7ff75:
|
@@ -46,6 +47,9 @@ describe('TextArea', () => { | |||
expect(mockFunc).toHaveBeenCalledTimes(2); | |||
wrapper.update(); | |||
expect(wrapper.find('textarea').props().style.overflow).toBeFalsy(); | |||
|
|||
expect(errorSpy).not.toHaveBeenCalled(); | |||
errorSpy.mockRestore(); |
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.
mockRestore 和 mockReset 有啥区别?
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.
mockReset
清空记录,但是继续监听。mockRestore
清空记录且停止监听。
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 72c56b1:
|
Will this end up on the 3.x tree in the next release? |
这个问题3.x什么时候更新? |
fix #21697
react@16.13
.react@16.13
下会报警告的问题。