Skip to content

fix: Correct the PortalProvider's getContainer typings #8185

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

Merged
merged 4 commits into from
May 7, 2025

Conversation

alexasselin008
Copy link
Contributor

@alexasselin008 alexasselin008 commented May 2, 2025

Closes

There was a small issue in the getContainer's typings.

There is the following code

    <PortalContext.Provider value={{getContainer: getContainer === null ? undefined : getContainer ?? ctxGetContainer}}>

Which means getContainer is intented to be null sometimes. There is a comment that also imply this:

Can clear the context by passing null.

But at the moment, getContainer does not accept the null value.

before:

(() => HTMLElement | null) | undefined

now:

(() => HTMLElement | null) | null | undefined

@alexasselin008
Copy link
Contributor Author

The Ci gives 43 lint error, not too sure what is happening here. They seem unrelated to my changes

@alexasselin008 alexasselin008 changed the title fix(overlays): Correct the PortalProvider typings fix: Correct the PortalProvider typings May 3, 2025
@snowystinger
Copy link
Member

Those are lint warnings and you can ignore them. It failed on the tsc step

@alexasselin008 alexasselin008 changed the title fix: Correct the PortalProvider typings fix: Correct the PortalProvider's getContainer typings May 5, 2025
@reidbarber reidbarber enabled auto-merge May 7, 2025 16:09
@reidbarber reidbarber added this pull request to the merge queue May 7, 2025
Merged via the queue into adobe:main with commit b07a79d May 7, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants