Allow setting Max-height and Max-width on more components? #3427
Unanswered
PascalVorwerk
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Don't think that is a good idea. Why not use some user defined CSS classes? If we add this, the next ask could be "why not also add MinHeight?". It's all code that needs to be maintained and tested eyc |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering if anyone else had this need before? I often want to define a 'maximum' allowed height and width of a container or list, but if there is no elements inside it, it can stay small.
For example a list box, you can define the height either by using 'auto', but this would mean the list could grow indefinetly. If you set the height to lets say 200px, the list will be this large even if there are no elements in the list.
Now i realize you can potentially fix this by adding another container and letting this one overflow, but i feel like adding a few properties to set this on the component itself is easier and more convenient! Thoughts?
I feel like with some extra optional properties on the components, that are purely opt-in, we can easily add some more control on the underlying components.
For example list box:

I would love to add a 'MaxHeight' and a 'MaxWidth' property to allow some more finegrained control on the sizing of the element! Potentially other components could benefit from this aswell?
Beta Was this translation helpful? Give feedback.
All reactions