-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/core 8922 dropdown issue end of screen #117
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -335,6 +335,10 @@ export default { | |||
const fitsBelow = popupRect.height < availableHeightBelow | |||
const fitsAbove = popupRect.height < availableHeightAbove | |||
|
|||
if (fitsAbove && (containerRect.top + availableHeightAbove > viewport.height)) { |
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.
what does this condition mean? let's try to include the second part (containerRect.top + availableHeightAbove > viewport.height)
in a constant so it's easier to read
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.
should we make this check for the 4 sides? top, bottom, left and right?
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.
yes i think i need to add for bottom side as well. this is a condition that if the popup is higher then the container and excessing the end of screen, it detects and making the popup smaller and handles the translation
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.
- include second part in the constant
- check it for 4 sides
No description provided.