Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closeOnClick still requires disabling #1128

Open
viveleroi opened this issue Jun 18, 2024 · 3 comments
Open

closeOnClick still requires disabling #1128

viveleroi opened this issue Jun 18, 2024 · 3 comments

Comments

@viveleroi
Copy link

We just updated to v10.0.5 from v9.x. The docs for v10 say closeOnClick now defaults to false, however in our tests that's not true.

With it set to false like the following code, toasts do not close when clicked (unless they click a dismiss button). Removing this prop enables the close-on-click functionality, I can now close the toasts when clicking anywhere on them.

  <ToastContainer
    autoClose={5000}
    className={styles.notificationToasts}
    closeButton={CloseButton}
    closeOnClick={false} // removing this enables the functionality
    hideProgressBar
    newestOnTop
    toastClassName={styles.notificationToast}
    transition={slideTransition}
  />
@viveleroi
Copy link
Author

How would a comment change affect actual logic? This isn't a typing issue, this doesn't work as described in the changelog.

@viveleroi
Copy link
Author

Yet that PR is also changing the comment to say it defaults to false. What do you think this is fixing?

@viveleroi
Copy link
Author

Don't take my questioning so personally, it seems like you didn't even read the issue because what you're pointing out has no relevance. So I asked for clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant