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: Allow user to configure the Tooltip in the Table header #29002

Merged
merged 8 commits into from
Jan 26, 2021

Conversation

harrisoff
Copy link
Contributor

@harrisoff harrisoff commented Jan 24, 2021

🤔 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

Currently there is no way to configure the Tooltip in the Table header.

📝 Changelog

Language Changelog
🇺🇸 English Allow user to configure the Tooltip in the Table header
🇨🇳 Chinese 允许用户设置 Table header 中 Tooltip 的属性

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

View rendered components/table/index.en-US.md
View rendered components/table/index.zh-CN.md

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jan 24, 2021

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 24, 2021

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 aaecc3a:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Jan 24, 2021

Codecov Report

Merging #29002 (aaecc3a) into feature (4cf059a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           feature    #29002   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          393       393           
  Lines         7466      7467    +1     
  Branches      2152      2153    +1     
=========================================
+ Hits          7466      7467    +1     
Impacted Files Coverage Δ
components/table/Table.tsx 100.00% <ø> (ø)
components/table/hooks/useSorter.tsx 100.00% <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 4cf059a...aaecc3a. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2021

Size Change: +184 B (0%)

Total Size: 789 kB

Filename Size Change
./dist/antd-with-locales.min.js 313 kB +32 B (0%)
./dist/antd.compact.min.css 66.9 kB +31 B (0%)
./dist/antd.dark.min.css 68.2 kB +65 B (0%)
./dist/antd.min.css 66.9 kB +31 B (0%)
./dist/antd.min.js 274 kB +25 B (0%)

compressed-size-action

@@ -96,6 +97,7 @@ export interface TableProps<RecordType>
};
sortDirections?: SortOrder[];
showSorterTooltip?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

showSorterTooltip={{ placement: 'top' }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@afc163 afc163 Jan 24, 2021

Choose a reason for hiding this comment

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

I believe showSorterTooltip={{ ... }} is a better API.

showSorterTooltip: boolean | TooltipProps

@harrisoff harrisoff changed the title feat: Table header supports tooltipPlacement feat: Allow user to configure the Tooltip in the Table header Jan 24, 2021
@harrisoff harrisoff requested a review from afc163 January 25, 2021 09:00
Co-authored-by: 偏右 <afc163@gmail.com>
@afc163 afc163 merged commit 755669a into ant-design:feature Jan 26, 2021
chenshuai2144 added a commit that referenced this pull request Feb 1, 2021
* feat: Allow user to configure the Tooltip in the Table header (#29002)

* feat: Table header supports tooltipPlacement

* docs: add Table tooltipPlacement

* feat: Allow user to configure the Tooltip in the Table header

* fix: fix jsx and use old code style

* fix: replace if blocks with ternary operator

* docs: fix url

Co-authored-by: 偏右 <afc163@gmail.com>

* docs: fix url

Co-authored-by: harrisoff <john@smith.kyon>
Co-authored-by: 偏右 <afc163@gmail.com>

* fix: Row with gutter has additional gap (#29059)

* chore: init gutter

* feat: col support gap

* chore: Update playground

* fix: Safari padding

* test: fix test case

* test: More test case

* docs: Update demo

* test: Update coverage

* test: Update test hack

* feat(input-number): add keyboard prop to support disable keyboard (#29110)

Co-authored-by: Ant Design GitHub Bot <yesmeck+ant-design-bot@gmail.com>
Co-authored-by: Harrison <stlebea@foxmail.com>
Co-authored-by: harrisoff <john@smith.kyon>
Co-authored-by: 偏右 <afc163@gmail.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
Co-authored-by: Kermit <kermitlx@outlook.com>
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.

3 participants