-
Notifications
You must be signed in to change notification settings - Fork 132
Improve device menu auto placement #1117
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
Conversation
🦋 Changeset detectedLatest commit: 9c12fe9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
Ocupe
left a comment
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.
Not sure if we should remove the resize event listener.
| React.useEffect(() => { | ||
| document.addEventListener<'click'>('click', handleClickOutside); | ||
| window.addEventListener<'resize'>('resize', () => setUpdateRequired(true)); | ||
| // window.addEventListener<'resize'>('resize', () => setUpdateRequired(true)); |
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.
Is this intentional or should it be removed?
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.
the idea is that the responsibility for this is being shifted to the autoUpdate helper of the floating ui lib.
this includes screen resizing and a bunch of other things, see https://floating-ui.com/docs/autoupdate
| return () => { | ||
| document.removeEventListener<'click'>('click', handleClickOutside); | ||
| window.removeEventListener<'resize'>('resize', () => setUpdateRequired(true)); | ||
| // window.removeEventListener<'resize'>('resize', () => setUpdateRequired(true)); |
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.
same
No description provided.