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: The 'indentSize' in the Table component couldn't be zero value #25890

Merged
merged 3 commits into from
Jul 30, 2020

Conversation

OmriGM
Copy link
Contributor

@OmriGM OmriGM commented Jul 29, 2020

  • Changed to indentSize prop logic of the Table component to also include zero values

[中文版模板 / Chinese template]

🤔 This is a ...

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

🔗 Related issue link

#25798

💡 Background and solution

Before:

mergedExpandable.indentSize = mergedExpandable.indentSize || indentSize || 15;

After:

if (mergedExpandable.indentSize === null || mergedExpandable.indentSize === undefined) {
   mergedExpandable.indentSize = indentSize !== null && indentSize !== undefined ? indentSize : 15;
 }

📝 Changelog

Language Changelog
🇺🇸 English Fix Table indentSize couldn't be zero value.
🇨🇳 Chinese

☑️ 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

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jul 29, 2020

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jul 29, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 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 3f8b9b5:

Sandbox Source
antd reproduction template Configuration

@07akioni
Copy link
Contributor

CI failed

@OmriGM
Copy link
Contributor Author

OmriGM commented Jul 29, 2020

@07akioni When I run npm test -- -w 1 (like in the failing CI tests) locally all the tests passes, any idea?

@@ -1518,11 +1512,8 @@ exports[`Cascader should render not found content 1`] = `
motionEnter={false}
motionLeave={false}
motionName="slide-up"
onAppearStart={[Function]}
Copy link
Member

Choose a reason for hiding this comment

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

You should't update this, please run npm test -- -u after reinstall node_modules.

@afc163
Copy link
Member

afc163 commented Jul 29, 2020

Could you add a test case?

@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #25890 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #25890   +/-   ##
=======================================
  Coverage   99.57%   99.57%           
=======================================
  Files         373      373           
  Lines        7306     7307    +1     
  Branches     2038     1991   -47     
=======================================
+ Hits         7275     7276    +1     
  Misses         31       31           
Impacted Files Coverage Δ
components/table/Table.tsx 99.26% <100.00%> (+<0.01%) ⬆️

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 7776722...3f8b9b5. Read the comment docs.

- Used check with typeof === number instead of `undefined` and `null`
@afc163 afc163 merged commit 8800b56 into ant-design:master Jul 30, 2020
@OmriGM OmriGM deleted the OmriGM-fix branch July 30, 2020 07:02
@afc163 afc163 mentioned this pull request Aug 2, 2020
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.

4 participants