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

OverlayToaster does not accept children as props with @types/react v18 #6363

Closed
SiimTa opened this issue Aug 30, 2023 · 2 comments · Fixed by #6369
Closed

OverlayToaster does not accept children as props with @types/react v18 #6363

SiimTa opened this issue Aug 30, 2023 · 2 comments · Fixed by #6369

Comments

@SiimTa
Copy link

SiimTa commented Aug 30, 2023

Environment

  • Package version(s): 5.2.1
  • Browser and OS versions: Windows 11

Problem

After migrating to version 5.x.x, I noticed that OverlayToaster does not accept children anymore. I suspect this was not intended?
There are still examples about it here: https://blueprintjs.com/docs/#core/components/toast.overlaytoaster
And also there was no mention of deprecating children and only using the recommended consumption in the changelog

@adidahiya
Copy link
Contributor

@SiimTa are you using @types/react v18? Do you have a code sandbox link to repro the issue?

Removal of the children API for <OverlayToaster> was not intended in v5.0. I think this should be an easy fix, we just need to explicitly declare children as a prop in OverlayToasterProps, similar to this PR where we did it for other class components: #5266

@SiimTa
Copy link
Author

SiimTa commented Aug 31, 2023

@adidahiya Sure, here it is: https://codesandbox.io/s/blueprintjs-overlaytoaster-prop-problems-vsld8l

If you don't define any other props, it works fine. But as soon as I define anything("position" in that case), it cannot find the children prop.

@adidahiya adidahiya changed the title OverlayToaster does not accept children as props OverlayToaster does not accept children as props with @types/react v18 Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants