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: Table selections type when use Table.SELECTION_ALL or Table.SELECTION_INVERT #23462

Merged
merged 5 commits into from
Apr 22, 2020
Merged

Conversation

xiaoxintang
Copy link
Contributor

@xiaoxintang xiaoxintang commented Apr 22, 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?)

💡 Background and solution

when use typescript to use Table selections,it will show me an error because of Table.SELECTION_ALL or Table.SELECTION_INVERT is a string type

📝 Changelog

Language Changelog
🇺🇸 English the type of Table's selections was changed from ` SelectionItem[]
🇨🇳 Chinese 修改Table的selections类型定义从 ` SelectionItem[]

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

@afc163 afc163 changed the title fix:Table selections type when use Table.SELECTION_ALL or Table.SELECTION_INVERT fix: Table selections type when use Table.SELECTION_ALL or Table.SELECTION_INVERT Apr 22, 2020
@afc163 afc163 requested a review from zombieJ April 22, 2020 01:35
@ant-design-bot
Copy link
Contributor

ant-design-bot commented Apr 22, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 22, 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 260f98e:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #23462 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23462   +/-   ##
=======================================
  Coverage   98.48%   98.48%           
=======================================
  Files         364      364           
  Lines        7320     7320           
  Branches     2007     2008    +1     
=======================================
  Hits         7209     7209           
  Misses        111      111           
Impacted Files Coverage Δ
components/table/hooks/useSelection.tsx 98.32% <100.00%> (ø)

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 db97c57...260f98e. Read the comment docs.

@afc163
Copy link
Member

afc163 commented Apr 22, 2020

@xiaoxintang
Copy link
Contributor Author

Could you add type test in https://github.com/ant-design/ant-design/blob/master/components/table/__tests__/type.test.tsx ?

i don't know how, need your help

@zombieJ zombieJ merged commit 937beba into ant-design:master Apr 22, 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