Skip to content

Commit 031a998

Browse files
Fix react warning from Toaster (#7574) (#7581)
1 parent 2b12bb2 commit 031a998

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/components/toast/overlayToaster.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ export class OverlayToaster extends AbstractPureComponent<OverlayToasterProps, O
295295
}
296296

297297
private renderToast = (toast: ToastOptions) => {
298-
return <Toast {...toast} onDismiss={this.getDismissHandler(toast)} />;
298+
const { key, ...toastProps } = toast;
299+
return <Toast key={key} {...toastProps} onDismiss={this.getDismissHandler(toast)} />;
299300
};
300301

301302
private createToastOptions(props: ToastProps, key = `toast-${this.toastId++}`) {

0 commit comments

Comments
 (0)