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: Expose default Toast Item life prop for overriding #13577

Closed
sjwall opened this issue Aug 30, 2023 · 1 comment
Closed

Toast: Expose default Toast Item life prop for overriding #13577

sjwall opened this issue Aug 30, 2023 · 1 comment
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@sjwall
Copy link
Contributor

sjwall commented Aug 30, 2023

Describe the feature you would like to see added

Add a property to Toast to allow for the default life for Toasts to be changed

Is your feature request related to a problem?

The 3000ms default is not always suitable to client requirements when the toast messages may consistently be longer. In a larger code base this can be more difficult to manage a default life that is longer when it needs to be set on every message added to the message service

Describe the solution you'd like

Add a property life to Toast like so:

<p-toast [life]="10000"></p-toast>

This will then override the 3000 default with 10000

Describe alternatives you have considered

Wrapping the message service with a custom message service that adds a default life to all messages that don't have one specified

Additional context

I have raised PR #13570 which covers implementing this prop

@sjwall sjwall added Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request labels Aug 30, 2023
@mertsincan mertsincan removed Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 30, 2023
@mertsincan mertsincan added this to the 16.2.1 milestone Aug 30, 2023
@mertsincan
Copy link
Member

Fixed in #13570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

2 participants