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

type: Table pagination.position support none as value #45398

Merged
merged 1 commit into from Oct 18, 2023

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Oct 18, 2023

[中文版模板 / 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
  • Workflow
  • Other (about what?)

🔗 Related issue link

close #45362

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Table pagination.position should accept 'none'.
🇨🇳 Chinese 修复 Table pagination.position TS 定义不支持 'none' 的问题。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

🚀 Summary

🤖 Generated by Copilot at 82df0ca

This pull request improves the type definitions and usage of table pagination in the Table component and its demos. It adds a new option for TablePaginationPosition to hide pagination, fixes some typos and imports, and refactors some code for clarity and consistency. It affects the files components/table/__tests__/type.test.tsx, components/table/demo/component-token.tsx, components/table/demo/dynamic-settings.tsx, components/table/demo/pagination.tsx, and components/table/interface.ts.

🔍 Walkthrough

🤖 Generated by Copilot at 82df0ca

  • Add support for none value in pagination.position prop of Table component, which hides the pagination (link, link, link, link, link)
  • Import TablePaginationConfig type from antd/es/table in demo files to avoid duplication and use it for defining TablePaginationPosition type (link, link, link)
  • Remove redundant TablePaginationPosition type from demo files, as it is already defined in interface.ts (link, link, link)
  • Simplify top variable in demo files to use TablePaginationPosition type directly, without casting it (link, link)
  • Fix typo in showFooter variable name in demo files for consistency and readability (link, link, link, link, link, link)
  • Move describe block for testing typescript types of Table component inside the describe block for testing Table component in type.test.tsx file, to group related tests together (link)

@stackblitz
Copy link

stackblitz bot commented Oct 18, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@afc163 afc163 marked this pull request as ready for review October 18, 2023 03:19
@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 397.92 KB
./dist/antd-with-locales.min.js 457.23 KB

@argos-ci
Copy link

argos-ci bot commented Oct 18, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Oct 18, 2023, 3:32 AM

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (7ceb1fb) 100.00% compared to head (82df0ca) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #45398   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          694       694           
  Lines        11674     11674           
  Branches      3117      3117           
=========================================
  Hits         11674     11674           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Yuiai01
Copy link
Contributor

Yuiai01 commented Oct 18, 2023

LGTM

@afc163 afc163 merged commit 8c475a5 into master Oct 18, 2023
98 checks passed
@afc163 afc163 deleted the fix/table-pagination-position-type branch October 18, 2023 05:33
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.

Wrong TablePaginationPosition value for typescript
3 participants