Skip to content

enable tooltip when content overflows table cell #1396

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

Closed
wants to merge 5 commits into from
Closed

enable tooltip when content overflows table cell #1396

wants to merge 5 commits into from

Conversation

winter-loo
Copy link

[中文版模板 / Chinese template]

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. enable tooltip when table cell content overflows
  2. solves the issue Table组件期望能类似element ui的table一样,当column内容过长时实现ellipse使用...显示 #1238

API Realization

  1. Basic thought of solution and other optional proposal.
    when enabling showOverflowTooltip for a column, this column gets a tooltip rendered. But if its content does not overflows, the tooltip is hided.

  2. List final API realization and usage sample.
    add a new prop to column attribute: showOverflowTooltip. usage:

const column = [
      {
          title: 'address',
          dataIndex: 'address',
          showOverflowTooltip: true,
      },
]
  1. GIF or snapshot should be provided if includes UI/interactive modification.
    None.

What's the effect?

  1. Does this PR affect user? Which part will be affected?
    compatible.

  2. What will say in changelog?
    enable tooltip when add new attribute to column showOverflowTooltip

  3. Does this PR contains potential break change or other risk?
    None.

Changelog description

  1. English description
    enable tooltip when add new attribute to column showOverflowTooltip

  2. Chinese description
    表格列增加新属性: showOverflowTooltip.

Self Check before Merge

  • 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

Additional Plan? (Optional if not new feature)

If this PR related with other PR or following info. You can type here.

@netlify
Copy link

netlify bot commented Nov 8, 2019

Deploy preview for ant-desing-vue processing.

Building with commit 6831edb

https://app.netlify.com/sites/ant-desing-vue/deploys/5dc55a49d6f7780007fb5458

@codecov
Copy link

codecov bot commented Nov 8, 2019

Codecov Report

Merging #1396 into master will increase coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1396      +/-   ##
==========================================
+ Coverage   87.88%   88.01%   +0.12%     
==========================================
  Files         156      156              
  Lines        5392     5392              
  Branches     1521     1521              
==========================================
+ Hits         4739     4746       +7     
+ Misses        583      576       -7     
  Partials       70       70
Impacted Files Coverage Δ
components/table/interface.js 100% <ø> (ø) ⬆️
components/upload/Upload.jsx 86% <0%> (+7%) ⬆️

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 d8ac932...6831edb. Read the comment docs.

@wensonsmith
Copy link
Contributor

根据之前的反馈,我猜你这个应该不会合并,因为 react 版本的 antd 没有这个功能。。。

所以如果想添加新 feature ,最有效的方法是去 react 版本 pr, 这边会进行同步 🤦‍♂

@tangjinzhou
Copy link
Member

新增了 column.ellipsis 和 transformCellText 可以满足这类功能

@tangjinzhou tangjinzhou closed this May 6, 2020
@busyhe
Copy link

busyhe commented May 11, 2020

@tangjinzhou 怎么实现,能举个例子吗

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants