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

Typography.Paragraph ellipsis is not expandable if used inside <pre> for multiline text #48953

Open
janarvaezkng opened this issue May 16, 2024 · 0 comments · May be fixed by #49168
Open

Typography.Paragraph ellipsis is not expandable if used inside <pre> for multiline text #48953

janarvaezkng opened this issue May 16, 2024 · 0 comments · May be fixed by #49168
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@janarvaezkng
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  • create a
     element
  • add a typography.paragraph inside with ellipsis: { rows: 2, expandable: true }
  • render a long text inside the typography with multiple lines set by \n

What is expected?

the text shows ellipsis after 2 lines and a button to expand the text

What is actually happening?

ellipsis doesn't work

Environment Info
antd 5.17.2
React react 18
System macos
Browser chrome

If the expandable is removed, then the text has the ellipsis but there's no way to expand it.

Not sure if this should even be a new component. Use case: from a Input.TextArea, allow the user to create a multiline text. Save that on DB, and when fetching and rendering, be able to render that text in multiline as well, but be able to use an expandable ellipsis if the content is too long

@zombieJ zombieJ added 🐛 Bug Ant Design Team had proved that this is a bug. and removed unconfirmed labels May 17, 2024
@nova1751 nova1751 linked a pull request Jun 1, 2024 that will close this issue
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
2 participants