-
Notifications
You must be signed in to change notification settings - Fork 324
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
feat(MenuItem): allow observing submenu content resize when a re-render isn't triggered #2713
feat(MenuItem): allow observing submenu content resize when a re-render isn't triggered #2713
Conversation
A new prerelease version of this PR has been published! 🎉 To update
Or with npm:
To update
Or with npm:
|
/** | ||
* Enables the observation of content resize for the menu item's submenu. | ||
* When set to `true`, a ResizeObserver is attached to the popper content, | ||
* automatically triggering repositioning when the size of the submenu's content changes. | ||
* | ||
* This is useful for when submenu's content may grow or shrink without a re-render being triggered. | ||
*/ | ||
observeSubMenuContentResize?: boolean; |
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.
Are the implementation details really matter here? I think we can simplify it and just say that it will respond to resizing of the content
Also worth renaming prop name IMO, maybe autoAdjustSubMenuOnResize
?
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.
autoAdjustOnSubMenuContentResize
?
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.
Sounds good
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.
Cool! Just one comment about naming
A new prerelease version of this PR has been published! 🎉 To update
Or with npm:
To update
Or with npm:
|
https://monday.monday.com/boards/3532714909/pulses/8222833258
Before:
After: