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

fix(types): add missing ref prop to Portal #1031

Merged
merged 1 commit into from
Jun 2, 2022

Conversation

otonashixav
Copy link
Contributor

@otonashixav otonashixav commented Jun 2, 2022

Summary

  • Adds the missing ref prop to <Portal>.
  • If isSVG, the element in ref is SVGGElement, otherwise it is HTMLDivElement.
  • If useShadow, the element in ref has a non-null shadowRoot property.
  • ref is unused when mounting to document.head, however there is no way to detect this as HTMLHeadElement is typed identically to HTMLElement.

How did you test this change?

See https://tsplay.dev/mb0P2w.

@coveralls
Copy link

coveralls commented Jun 2, 2022

Pull Request Test Coverage Report for Build 2428538152

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.005%

Totals Coverage Status
Change from base Build 2405722957: 0.0%
Covered Lines: 1242
Relevant Lines: 1325

💛 - Coveralls

- Adds the missing `ref` prop to `<Portal>`.
- If `isSVG`, the element in `ref` is `SVGGElement`, otherwise it is `HTMLDivElement`.
- If `useShadow`, the element in `ref` has a non-null `shadowRoot` property.
- `ref` is unused when mounting to `document.head`, however there is no way to detect this as `HTMLHeadElement` is typed identically to `HTMLElement`.

See https://tsplay.dev/mb0P2w.
@ryansolid ryansolid merged commit c23f730 into solidjs:main Jun 2, 2022
@otonashixav otonashixav deleted the fix-missing-portal-ref-type branch June 10, 2022 06:57
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

Successfully merging this pull request may close these issues.

None yet

3 participants