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

feat: add readonly modifier for antd table columns type #31888

Conversation

xiaoxiangmoe
Copy link

@xiaoxiangmoe xiaoxiangmoe commented Aug 24, 2021

[中文版模板 / 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
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

related issue: react-component/table#574

support readonly array in antd table columns type

📝 Changelog

Language Changelog
🇺🇸 English Support ReadonlyArray in table columns
🇨🇳 Chinese table columns 字段支持使用 ReadonlyArray

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 24, 2021

@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #31888 (99b458e) into master (6776bb8) will not change coverage.
The diff coverage is n/a.

❗ Current head 99b458e differs from pull request most recent head 681295f. Consider uploading reports for the commit 681295f to get more accurate results

@@            Coverage Diff             @@
##            master    #31888    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          422       399    -23     
  Lines         7841      7591   -250     
  Branches      2276      2078   -198     
==========================================
- Hits          7841      7591   -250     
Impacted Files Coverage Δ
components/_util/raf.ts 100.00% <0.00%> (ø)
components/form/util.ts 100.00% <0.00%> (ø)
components/grid/row.tsx 100.00% <0.00%> (ø)
components/form/Form.tsx 100.00% <0.00%> (ø)
components/tree/Tree.tsx 100.00% <0.00%> (ø)
components/_util/wave.tsx 100.00% <0.00%> (ø)
components/affix/utils.ts 100.00% <0.00%> (ø)
components/input/utils.ts 100.00% <0.00%> (ø)
components/list/index.tsx 100.00% <0.00%> (ø)
components/menu/index.tsx 100.00% <0.00%> (ø)
... and 147 more

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 6776bb8...681295f. Read the comment docs.

@tychenjiajun
Copy link
Contributor

@zombieJ Can this be merged?

@tychenjiajun
Copy link
Contributor

tychenjiajun commented Apr 2, 2022

When can this be merged? The proposing change is exactly same as the source code in rc-table @afc163

@afc163
Copy link
Member

afc163 commented Apr 2, 2022

  1. CI broken
  2. Please add typing test case

@xiaoxiangmoe
Copy link
Author

ok, I' fix it tomorrow.

@@ -44,7 +44,7 @@ describe('Table.typescript types', () => {
name: string;
}

const columns: ColumnProps<User>[] = [
const columns: readonly ColumnProps<User>[] = [
Copy link
Member

Choose a reason for hiding this comment

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

Please add a new type test case instead updating old one.

@li-jia-nan
Copy link
Member

Hey! Conflicting files, and it seems this is now really outdated. If this is something that still makes sense to the latest master version of antd, please send a new PR with this change :)

@li-jia-nan li-jia-nan closed this Jan 9, 2023
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.

None yet

4 participants