Skip to content
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

🐛 fix issue with select menu getting cut by edge of modal #1428

Merged
merged 6 commits into from
Oct 5, 2023

Conversation

gitdallas
Copy link
Collaborator

image

becomes

image

@gitdallas gitdallas requested a review from ibolton336 October 3, 2023 20:02
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (47bef2e) 41.19% compared to head (7ed9d05) 41.19%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1428   +/-   ##
=======================================
  Coverage   41.19%   41.19%           
=======================================
  Files         139      139           
  Lines        4372     4372           
  Branches     1007     1007           
=======================================
  Hits         1801     1801           
  Misses       2559     2559           
  Partials       12       12           
Flag Coverage Δ
client 41.19% <ø> (ø)
server ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
client/src/app/components/SimpleSelect.tsx 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -40,6 +40,7 @@ export const SimpleSelect: React.FC<ISimpleSelectProps> = ({

return (
<Select
menuAppendTo="parent" // prevent menu from being clipped by modal edges
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this overflow seems to be a much better experience, but not sure if it is the PF friendly way to accomplish this.

Suggested change
menuAppendTo="parent" // prevent menu from being clipped by modal edges
menuAppendTo="parent" // prevent menu from being clipped by modal edges
style={{ overflowY: "auto", maxHeight: "200px" }}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-10-03 at 7 54 02 PM

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added a maxHeight of 200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the overflow?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the overflow now with the maxHeight set. LGTM other than the console.log

@gitdallas gitdallas force-pushed the fix/select-cut-by-modal branch from 5eb2ea7 to da050d4 Compare October 4, 2023 13:20
@gitdallas gitdallas requested a review from ibolton336 October 4, 2023 13:22
@@ -40,6 +40,7 @@ export const SimpleSelect: React.FC<ISimpleSelectProps> = ({

return (
<Select
menuAppendTo="parent" // prevent menu from being clipped by modal edges
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the overflow?

@gitdallas
Copy link
Collaborator Author

@ibolton336 overflow is automatic

@@ -40,6 +40,7 @@ export const SimpleSelect: React.FC<ISimpleSelectProps> = ({

return (
<Select
menuAppendTo="parent" // prevent menu from being clipped by modal edges
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the overflow now with the maxHeight set. LGTM other than the console.log

@@ -37,9 +37,11 @@ export const SimpleSelect: React.FC<ISimpleSelectProps> = ({
...props
}) => {
const [isOpen, setIsOpen] = useState(false);

console.log({ ...props });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guy snuck in. Otherwise LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants