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

Add support for passing an array of ids to the containerId prop #1162

Open
therialguz opened this issue Oct 1, 2024 · 1 comment
Open

Add support for passing an array of ids to the containerId prop #1162

therialguz opened this issue Oct 1, 2024 · 1 comment

Comments

@therialguz
Copy link

Do you want to request a feature or report a bug?

Feature: Add support for passing an array of strings or numbers to the containerId prop.

What is the current behavior?
Currently, we cannot show a toast in multiple containers without executing or calling the toast() function multiple times.

toast("hello Default", {
  autoClose: false,
  hideProgressBar: false,
  closeOnClick: true,
  pauseOnHover: true,
  draggable: true,
  progress: undefined,
  containerId: "gpt",
});

toast("hello Default", {
  autoClose: false,
  hideProgressBar: false,
  closeOnClick: true,
  pauseOnHover: true,
  draggable: true,
  progress: undefined,
  containerId: "default",
});

What is the expected behavior?
We expect that the toast function accepts a list of containerIds to show/attach to it.

toast("hello Default", {
  autoClose: false,
  hideProgressBar: false,
  closeOnClick: true,
  pauseOnHover: true,
  draggable: true,
  progress: undefined,
  containerId: ["default", "gpt"],
});
@therialguz therialguz changed the title Add support for passing an array of strings or numbers to the containerId prop Add support for passing an array of ids to the containerId prop Oct 1, 2024
@therialguz
Copy link
Author

I can start working on this feature and create a pull request if you’re open to the idea.

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