-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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/Messages: remove not working #5083
Comments
|
@rpiaggio have you debugged for a potential solution? |
One possible solution is to make the |
yeah this is tricky. I know the |
Yes, that's the case. |
i will take a look and see if I can fix it. |
Check out my PR. I check for either ID equality or if you pass a message like you are message equality of the JSON object. |
This seems like it should work, thank you! I'll eagerly await for the release. |
i tested it locally and its working so crossing my fingers! Keep your eye out for a 10.0.4 release and let me know how it goes. |
OK 10.0.4 is out if you want to test this fix. |
Describe the bug
Support to remove specific toast messages was added in #3457.
However, this doesn't seem to work. A peek at the implementation seems to identify the shown message by the
_pId
property, which is inaccesible by the client code.Reproducer
https://codesandbox.io/s/primereact-test-forked-bbns8k?file=/src/index.js
PrimeReact version
10.0.3
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
toastRef.current.show(msg)
.toastRef.current.remove(msg)
.Expected behavior
Toast is removed.
The text was updated successfully, but these errors were encountered: