Is it possible to limit the number of results displayed in a dropdown select tag and add a scrollbar if there are more options?
Check out my code below:
<select class="form-control" name="selectedOption" [(ngModel)]='selectedOption'>
<option value="" [disabled]="true">Disabled</option>
<option value="">All Options</option>
<option *ngFor="let name of options" [ngValue]="name">{{name}}</option>
</select>
I'm looking to initially display 8 results with a scrollbar for any additional options. If this isn't achievable with the select tag, what would be the best alternative method? Perhaps using a dropdown with links within a div and applying overflow on the div? What suggestions do you have for solving these challenges effectively?
Thank you.