I want to provide a list which will vary with the input of a text box. This list will provide the results for that search query. I am using amp-list for this.
I want the list height to adjust to the number of results (flex-item should be fine here). But I want the list to have a max height of e.g. 500px and no more
Is this possible? Thank you very much
Dynamic resizing is currently in the works: see this thread on GitHub - although not sure if this applies in your current situation. Are you able to provide the code or a link to what you're currently working on?
To accomplish the max-height with an overflow of scroll, put a container div around the amp-list. Something like below.
div#list-container {
max-height: 500px;
overflow: scroll;
}
<div id="list-container">
<amp-list>
</amp-list>
</div>