-
Notifications
You must be signed in to change notification settings - Fork 0
ERA-11311: Dropdown list hidden when at bottom of event #1304
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
By customizing menuPortalTarget and styles of menuPortal to render the menu options in the body We ensure no other element blocks the menu, I know We've avoid the usage of zIndex but in this case this styles are only applied to the portal which is rendered only when the options menu is opened, from there also menuPlacement is added, making the select component aware of the space around it allowing it to render the menu in the best place possible. I'm adding this behavior as the default to all our Select components which are implemented based on |
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.
I remember we discussed this ticket in a frontend refinement and we agreed that the best solution would be to just add an extra empty space at the bottom of the form when needed (for new reports I guess, since existing reports will have the History section, which adds the space needed to open the dropdown). This z-index solution is not scalable, since we may want to render our fields in drawers, modals, popovers, etc...
Actually, we do render the v2 selects in modals when they are in a collection, and I couldn't test that. Why not to simply add that extra space? Sounds like a good solution and wouldn't involve these magic z-index numbers.
Yep, I got your point about the z-index, I don't think calculating extra space will be something that resolves the root of the issue, because it has several implications like the order of appearance of the dropdown or the layout of the form, the same goes when having lets say a dropdown as the third element in a form but the content of the menu options also requires to calculate extra space? it would be a calculation We need to do for all dropdown that meet specific criteria. For me, this is an issue of component behavior and not a layout problem. I think the problem is making aware the component itself of its surroundings and display the menu as better as possible, this is not new, react-select already solves this issue through So I think that applying this behavior to all our dropdown it is way more reliable than adding space/layout calculations. I will remove the z-index, I will add some event to replicate the issue, feel free to take a look to the feature env and if after removing the z-index still seems like a bad path to go I can take a look to the spacing stuff |
Carcass is the event type with the dropdowns form |
What does this PR do?
How does it look
Relevant link(s)