Skip to content

Commit

Permalink
Fix primefaces#6784 - Toast onRemove message (primefaces#7108)
Browse files Browse the repository at this point in the history
* Fixed toast onRemove message

* Fixed Messages.js onRemove message

---------

Co-authored-by: pablo.garcia.almis <[email protected]>
  • Loading branch information
lukelalo and pablo.garcia.almis authored Sep 4, 2024
1 parent 0a4eee5 commit 2863e6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/lib/messages/Messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const Messages = React.memo(

setMessagesState((prev) => prev.filter((msg) => msg._pId !== messageInfo._pId && !ObjectUtils.deepEquals(msg.message, removeMessage)));

props.onRemove && props.onRemove(removeMessage.message || removeMessage);
props.onRemove && props.onRemove(messageInfo.message || removeMessage);
};

const onClose = (messageInfo) => {
Expand Down
2 changes: 1 addition & 1 deletion components/lib/toast/Toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const Toast = React.memo(

setMessagesState((prev) => prev.filter((msg) => msg._pId !== messageInfo._pId && !ObjectUtils.deepEquals(msg.message, removeMessage)));

props.onRemove && props.onRemove(removeMessage.message || removeMessage);
props.onRemove && props.onRemove(messageInfo.message || removeMessage);
};

const onClose = (messageInfo) => {
Expand Down

0 comments on commit 2863e6c

Please sign in to comment.