Check out my StackBlitz project that I've set up
In the styles.css file, you'll notice that I defined a fixed width of 650px for the option dropdown div, which is currently working fine
@import '~bootstrap/dist/css/bootstrap.min.css';
.my_choices_inner {
display: inline-block;
vertical-align: top;
width: 100%;
padding: 0;
margin-top: -2px;
min-height: 44px;
overflow: hidden;
}
.choices__list--dropdown,
.choices__list[aria-expanded] {
word-break: break-word;
width: 650px;
}
.choices {
margin-bottom: 0;
}
However, I would prefer if the width could dynamically adjust based on the length of options in the dropdown
Setting the width to "100%" doesn't cause any overflow issues. I've also tried "fit-content" and "auto" without success
Is there a way to achieve this without the text wrapping and everything staying in one line?