Combobox expanding to fit overflow #4116
-
Hello! Does the Combobox component have a setting to let it automatically expand to the width of the content (if the content is greater than the default width)?  thanks! If not, what are some alternatives/when would that potentially be available? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Sorry, I don't know how to help with that. I did do a search though, and I managed to find these other Discussions that might be similar or related to your question. Give them a read to see if they answer your question. If they do, head back here and update this discussion and mark it as answered, pointing others to the related discussion:
|
Beta Was this translation helpful? Give feedback.
-
Hi @drew-thompson, can you share more details about the use-case of extending the width of the content popover? Figma link or screenshots of the designs will work. I will share the details with the team and come back to you. |
Beta Was this translation helpful? Give feedback.
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…