I'm trying to apply an autoComplete feature on my web app but I can't seem to find a way to make the options to adjust to the longest content.
the only thing I can do is to make it into a fixed length using this css:
.autocomplete-suggestions li {
width: 100%;
max-width: 300px;
}
but then the content of the option would get cut off.. how do I make it show the entire content instead?
I finally got it to work as I hope after tinkering with the css before and I'd like to share a bit what I found out. hopefully this answer will help someone in need.
I used these css:
the html structure are more or less like this:
I'm still not 100% sure which css rules made it work.. but hey, as long as it works, right?