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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ellipsis onExpand function takes event parameter #22092

merged 1 commit into from
Mar 11, 2020


Copy link

@BlazPocrnja BlazPocrnja commented Mar 10, 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?)

馃敆 Related issue link

馃挕 Background and solution

The Ellipses onExpand function in Typography.Paragraph doesn't have an event parameter, meaning you can't handle browser events onClick. An example I ran into was wanting to have an expandable ellipses on a table with it's own row click event. Without this event handler, I cannot stop propagation and prevent the row click event from executing.

馃摑 Changelog

Current usage: { rows: 1, expandable: true, onExpand: () => {// do something} }
New usage: { rows: 1, expandable: true, onExpand: (e) => {// do something with e} }

This shouldn't break any existing usage as passing a function prototype with no parameters works the same as before.

Language Changelog
馃嚭馃嚫 English
馃嚚馃嚦 Chinese

鈽戯笍 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/typography/

@BlazPocrnja BlazPocrnja changed the title Ellipsis onExpand function takes event parameter feat: ellipsis onExpand function takes event parameter Mar 10, 2020
Copy link

ant-design-bot commented Mar 10, 2020

Copy link

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 8995ffd:

Sandbox Source
antd reproduction template Configuration

Copy link

codecov bot commented Mar 10, 2020

Codecov Report

Merging #22092 into feature will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           feature   #22092   +/-   ##
  Coverage    97.98%   97.98%           
  Files          307      307           
  Lines         7087     7087           
  Branches      1957     1956    -1     
  Hits          6944     6944           
  Misses         143      143           
Impacted Files Coverage 螖
components/typography/Base.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 145f727...8995ffd. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants