-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
EZP-31347: Added functionality to show dropdown above select field #1218
EZP-31347: Added functionality to show dropdown above select field #1218
Conversation
if (isListHidden) { | ||
const viewportHeight = window.innerHeight || document.documentElement.clientHeight; | ||
const { top } = this.itemsContainer.getBoundingClientRect(); | ||
|
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.
|
||
this.itemsContainer.classList.toggle(CLASS_ITEMS_HIDDEN); | ||
doc.body[methodName]('click', this.onClickOutside, false); | ||
|
||
const bodyMethodName = isListHidden ? 'addEventListener' : 'removeEventListener'; |
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.
can be moved before the iff to the other const
@@ -8,6 +8,8 @@ | |||
&__items { | |||
border: none; | |||
box-shadow: 0 calculateRem(2px) calculateRem(4px) 0 rgba(0, 0, 0, 0.45); | |||
max-height: calculateRem(300px); | |||
overflow-y: scroll; |
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.
always scroll? I think better will be auto
Could you merge it up? |
Merge up done. |
Select list now will be positioned above select field if there is less than 300px to the bottom of screen.
Checklist:
$ composer fix-cs
)