Skip to content

Commit

Permalink
Fixes #37915 - Give Toasts keys for ToastsList
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAga committed Oct 15, 2024
1 parent 92e7ae9 commit 4d43e55
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const ToastsList = ({ railsMessages }) => {
([key, { type, message, link, sticky, ...toastProps }]) => (
<Alert
ouiaId={`toast-item-${key}`}
key={key}
title={toastTitle(message, toastType(type))}
variant={toastType(type)}
timeout={sticky ? false : 8000}
Expand All @@ -44,6 +43,7 @@ const ToastsList = ({ railsMessages }) => {
)
}
{...toastProps}
key={toastProps.key || key}
>
{(message.length > 60 || React.isValidElement(message)) && message}
</Alert>
Expand Down

0 comments on commit 4d43e55

Please sign in to comment.