Skip to content

Combobox expanding to fit overflow #4116

Answered by serifluous
drew-thompson asked this question in Q&A
Discussion options

You must be logged in to vote

Got it—We put a sandbox together for how you can achieve this using code to set a reasonable width for extra long content: https://codesandbox.io/p/sandbox/x6lwdn

We decided against auto-sizing the component and instead built Combobox so it'll fill the parent container allowing it to meet all design cases. We decided not to alter this as it would cause overflow issues if we expanded this component and the implementation would then not support scroll in the parent container causing it to be cut off. We also need to take device screen width into account for mobile users. Native support for not exceeding the viewable area is built in with our current solution.

Our standard recommendation wou…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@PixeledCode
Comment options

@serifluous
Comment options

@drew-thompson
Comment options

@serifluous
Comment options

Answer selected by serifluous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants