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

Select Component: Added a default max height and a property to set a max height #58

Merged
merged 3 commits into from
Oct 28, 2022

Conversation

achampagnedev
Copy link
Contributor

@achampagnedev achampagnedev commented Oct 28, 2022

Project organization

Description

This PR's goal is to add more control on the Select component dropdown height. I added a default height of Chakra 52 => 13rem as well as the property dropdownMaxHeight to allow passing of a custom max height. This solves problems similar to: https://github.com/liteflow-labs/hodooi/issues/29

How to test

Storybook: https://storybook-components-kqgkx0r1u-liteflow.vercel.app/?path=/story/templates-select-select--with-many-choices-and-max-height

See the newly created dropdownMaxHeight parameter in the controls section, change or remove to see default, property in action.

Checklist

  • Update related changelogs

@vercel
Copy link

vercel bot commented Oct 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
storybook-components ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Oct 28, 2022 at 7:35AM (UTC)
storybook-templates ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Oct 28, 2022 at 7:35AM (UTC)

@achampagnedev achampagnedev self-assigned this Oct 28, 2022
@vercel vercel bot temporarily deployed to Preview – storybook-components October 28, 2022 07:09 Inactive
@vercel vercel bot temporarily deployed to Preview – storybook-templates October 28, 2022 07:15 Inactive
@vercel vercel bot temporarily deployed to Preview – storybook-components October 28, 2022 07:17 Inactive
@achampagnedev achampagnedev marked this pull request as ready for review October 28, 2022 07:21
@achampagnedev achampagnedev changed the title Added a default max height and a property to set a max height Select Component: Added a default max height and a property to set a max height Oct 28, 2022
@vercel vercel bot temporarily deployed to Preview – storybook-templates October 28, 2022 07:32 Inactive
@vercel vercel bot temporarily deployed to Preview – storybook-components October 28, 2022 07:35 Inactive
@achampagnedev
Copy link
Contributor Author

Copy link
Member

@antho1404 antho1404 left a comment

Choose a reason for hiding this comment

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

While this does somehow fix the issue, I think we shouldn't have a really long select in a first place

@antho1404 antho1404 merged commit ffb575f into main Oct 28, 2022
@antho1404 antho1404 deleted the bugfix/select-dropdown-overflow branch October 28, 2022 09:21
@achampagnedev
Copy link
Contributor Author

While this does somehow fix the issue, I think we shouldn't have a really long select in a first place

Yes there should be a default maximum height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants