From 6f510ab8eaefc458dc55c0da69a9967dd06929ca Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 25 May 2022 12:24:38 +0100 Subject: [PATCH] Fixed #2928 - When Toast component is closed, its zIndex does not clear --- components/lib/toast/Toast.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/toast/Toast.js b/components/lib/toast/Toast.js index c1cf4a9724..f2936853cb 100644 --- a/components/lib/toast/Toast.js +++ b/components/lib/toast/Toast.js @@ -55,7 +55,7 @@ export const Toast = React.memo(React.forwardRef((props, ref) => { } const onExited = () => { - messagesState.length === 0 && ZIndexUtils.clear(containerRef.current); + messagesState.length === 1 && ZIndexUtils.clear(containerRef.current); props.onHide && props.onHide(); }