@rolster/react-components 18.26.15 → 18.26.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -3833,14 +3833,16 @@ function useSnackbar() {
3833
3833
  visible: false
3834
3834
  });
3835
3835
  const onClose = require$$0.useCallback(() => {
3836
+ timeoutId.current && clearTimeout(timeoutId.current);
3837
+ timeoutId.current = undefined;
3836
3838
  setState((state) => ({ ...state, visible: false }));
3837
3839
  }, []);
3838
3840
  const rlsSnackbar = (jsxRuntimeExports.jsx(RlsSnackbar, { ...state.config, visible: state.visible, onClose: onClose }));
3839
3841
  require$$0.useEffect(() => {
3840
3842
  if (state.visible) {
3841
3843
  timeoutId.current = setTimeout(() => {
3842
- setState((state) => ({ ...state, visible: false }));
3843
3844
  timeoutId.current = undefined;
3845
+ setState((state) => ({ ...state, visible: false }));
3844
3846
  }, duration.current);
3845
3847
  }
3846
3848
  else if (timeoutId.current) {