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

Toast: Long text does not display correctly #2926

Closed
andreiGadjylaJS opened this issue May 25, 2022 · 3 comments · Fixed by #2929
Closed

Toast: Long text does not display correctly #2926

andreiGadjylaJS opened this issue May 25, 2022 · 3 comments · Fixed by #2929
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@andreiGadjylaJS
Copy link

Describe the bug

If the content of the error is one large line, the text will go outside the component
image

Reproducer

https://codesandbox.io/s/gallant-banzai-soo2gq

PrimeReact version

8.1.0

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome 101.0.4951.67

Steps to reproduce the behavior

No response

Expected behavior

Text remained within the error output window

@andreiGadjylaJS andreiGadjylaJS added the Type: Bug Issue contains a defect related to a specific component. label May 25, 2022
@andreiGadjylaJS
Copy link
Author

Also, the window close button is missing.

@melloware melloware changed the title Component:Toast Toast: Long text does not display correctly May 25, 2022
@melloware
Copy link
Member

melloware commented May 25, 2022

Add this CSS to your CSS that loads after PrimeReact.

.p-toast .p-toast-message .p-toast-message-content .p-toast-detail {
    overflow-wrap: anywhere;
}

Working Sandbox: https://codesandbox.io/s/practical-rubin-zp6h2m

@melloware melloware added the Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team label May 25, 2022
melloware added a commit to melloware/primereact that referenced this issue May 25, 2022
@melloware melloware self-assigned this May 25, 2022
@melloware melloware added this to the 8.2.0 milestone May 25, 2022
@andreiGadjylaJS
Copy link
Author

Thanks!

@mertsincan mertsincan removed 👍 confirmed Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team labels Jul 1, 2022
mertsincan pushed a commit that referenced this issue Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants