-
Notifications
You must be signed in to change notification settings - Fork 506
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 of useAnchoredPosition to avoid type assertions. #4448
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @T-Hugs 👋🏻 Sorry for late review! Thanks so much for pushing this PR 🙌🏻 Left one question - and would recommend running integration tests at dotcom to make sure we are not introducing anything breaking. Let me know if you have any questions or concerns 🙌🏻
@@ -277,7 +266,7 @@ export const WithPortal = () => { | |||
const mainRef = React.useRef<HTMLElement>(null) | |||
|
|||
// Calculate the position of the menu | |||
const {floatingElementRef, anchorElementRef, position} = useAnchoredPosition( | |||
const {floatingElementRef, anchorElementRef, position} = useAnchoredPosition<HTMLButtonElement>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this require assertion from people that we don't have it now?
Closes #4447
Changelog
New
Changed
useAnchoredPosition
types updated to remove user type assertionsRemoved
Rollout strategy
Testing & Reviewing
Merge checklist