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: TextArea warning with React 16.13 #21703

Merged
merged 4 commits into from Feb 29, 2020
Merged

fix: TextArea warning with React 16.13 #21703

merged 4 commits into from Feb 29, 2020

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Feb 29, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

fix #21697

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix TextArea style get warning in react@16.13.
🇨🇳 Chinese 修复 TextArea 样式在 react@16.13 下会报警告的问题。

☑️ Self Check before Merge

  • 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

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Feb 29, 2020

? // React will warning when mix `overflow` & `overflowY`.
// We need to define this separately.
{ overflowX: 'hidden', overflowY: 'hidden' }
: null),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这能加用例么

@codecov
Copy link

codecov bot commented Feb 29, 2020

Codecov Report

Merging #21703 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
components/input/ResizableTextArea.tsx 92.72% <100%> (+0.27%) ⬆️

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 20a6ba3...ae7ff75. Read the comment docs.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 29, 2020

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:

Sandbox Source
antd reproduction template Configuration

@@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mockRestore 和 mockReset 有啥区别?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mockReset 清空记录,但是继续监听。mockRestore 清空记录且停止监听。

@codesandbox-ci
Copy link

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:

Sandbox Source
antd reproduction template Configuration

@zombieJ zombieJ merged commit 04bfb21 into master Feb 29, 2020
@zombieJ zombieJ deleted the fix-react-warning branch February 29, 2020 08:44
@pr-triage pr-triage bot added the PR: merged label Feb 29, 2020
@gotjoshua
Copy link
Contributor

Will this end up on the 3.x tree in the next release?

@zombieJ zombieJ mentioned this pull request Mar 4, 2020
10 tasks
afc163 added a commit that referenced this pull request Mar 9, 2020
@chenfengjw163
Copy link

这个问题3.x什么时候更新?

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.

TextArea mix shorthand and non-shorthand properties for the same value.
5 participants