Need Scroll Bar for Drop Down List populated by ng-options

fixed height dropdown (with scrollbar)
select option scrollbar css
scroll down list in html
scrollable dropdown
jquery dropdown scrollbar
dropdown with vertical scrollbar
ng dropdown scroll
select dropdown scrollbar css

I have this code which populates the drop dopwn menu:

echo "<div class='form-group'>";
echo "<label for='show'>Show:</label>";
echo "<select class='form-control' id='filterText' ng-model='filterText' ng-options='show_name for show_name in filterList'>"; // Show Type Dropdown
echo "</select>";
echo "</div>";

I want to be able to only show maybe 8 options then be able to scroll down to see the rest. How do I go about doing this? When I adjust the height, it just adjusts the height of the actual field instead of the drop down size.

This is not what I want:

TURNS OUT IF THE LIST IS LONG ENOUGH, IT WILL AUTOMATICALLY ADD A SCROLL BAR. THIS IS NOT ORIGINALLY WHAT I WANTED. IT WOULD BE EASIER IF THERE WERE 8 SHOWS SHOWN TO START WITH AND BE ABLE TO SCROLL THROUGH THE REST.

<select onfocus='if(this.options.length > 8){ this.size = 8; }' onblur='this.size=1;' onchange='this.size=1; this.blur();'>
  <option>1</option>
  <option>2</option>
  <option>3</option>
  <option>4</option>
  <option>5</option>
  <option>6</option>
  <option>7</option>
  <option>8</option>
  <option>9</option>
  <option>10</option>
</select>
<br>
<select onfocus='if(this.options.length > 8){ this.size = 8; }' onblur='this.size=1;' onchange='this.size=1; this.blur();'>
  <option>1</option>
  <option>2</option>
  <option>3</option>
  <option>4</option>
</select>

md-select, When the select is required and uses a floating label, then the label will placeholder="Select a state"> <md-option ng-value="opt" ng-repeat="opt in When a developer needs to put more than just a text label in the md-select-menu Use cases for this element include a sticky search bar and custom option group labels. I have created a drop down list in Acrobat with 21 items. Only the first 6 items appear when clicked - users then have to manually scroll down through the remainder of the list. There is more than enough room on the pdf to display all 21 items without the scroll bar.

 select {
            max-height: 300px;
            overflow-y: scroll;
 }

This should do it for you. Adjust max-height as necessary.

[Solved] how to make scroll bars in dropdown list?, The dropdown have near about 100 entries.I want to display first 10 entries and for the remaining entries i want to display a scrollbar for that. Is� Hi Guys, I am using a dropdown list in my apps.The dropdown have near about 100 entries.I want to display first 10 entries and for the remaining entries i want to display a scrollbar for that.

Maybe you can this implement HTML/JS/CSS solution into Angular?

 select {
    position:absolute;
 }
<div class='form-group'>
  <label for='show'>Show:</label>
  <select size='1' onmousedown='if (this.options.length > 8){this.size = 8}' onchange='this.size = 0' onblur="this.size = 1" class='form-control' id='filterText'>

    <option selected>Select</option>
    <option>This is an option</option>
    <option>This is another Option A</option>
    <option>This is another Option 2</option>
    <option>This is another Option 3</option>
    <option>This is another Option</option>
    <option>This is another Option</option>
    <option>This is another Option B</option>
    <option>This is another Option</option>
    <option>This is another Option</option>
    <option>This is another Option</option>

  </select>
</div>

Angular ng-options Directive, The ng-options directive uses an array to fill the dropdown list. In many cases it would be easier to use the ng-repeat directive, but you have more flexibility when � Hi All, I have created a simple Data Validation Drop Down List - see attached. When you select the list in B3, the drop down list appears as it should. Is there a way of taking away the scroll-down bar to let all of the selection appear in one click or to modify the scroll bar to allow either more or less data to appear as per personal requirements.

HTMl:

<div class='form-group'>
    <label for='show'>Show:</label>
    <select class='form-control' ng-class="{scrollClass' : show_name.length > 8}"

    id='filterText' ng-model='filterText' ng-options='show_name for show_name in filterList'></select>
</div>

ng-class="{scrollClass' : show_name.length > 8}"

CSS:

 .scrollClass{
            max-height: 300px;
            overflow-y: scroll;
 }

Remove scroll bar from <select> tag - HTML & CSS, Yes this form needs to be printed. Select one of the radio buttons under the sentence… Indicate the number of Curriculum areas to be evaluated… Select an option� I use dropdown button with dropdown-menu. See example below. How can add vertical scrollbar to menu. Configurations {{item.name}}

Option text overflowing out of browser in Select dropdown, I have a drop down list in my AngularJS app using <select>. id="cmbStatus" ng -model="cmbStatusSelected" ng-options="item. peppers </SELECT> When the size is set to 1 small scrollbar appears which makes the page clumsy. You can use a ul tag and style the li elements and use jquery to populate selected value� I have a similar problem and tried the method above, but it did not work. In a nutshell, the problem is that when I go to a drop-down on a web site (e.g., Amazon's drop-down on the left side of the search box, or eBay's "All Categories" drop-down on the right of its search box) and I click on it, it will open very briefly (maybe 1/10 of a second) and disappear.

Angularjs Select Ng Options Example, Body i find out that options example is just need is again. Will cause the scrollable ancestor for president of all the change, it by subscribing to Degree variable from dropdownlist value as angularjs example copy. Removal services offer a custom directive is correctly populated with your mobiscroll account to parse. When selecting a value from the drop down list, then it should be able to populate the value in another corresponding cell. For examples, you have created a drop down list based on the values in range B2:B4, and when you select any value from the drop down list, the corresponding value in range c2:C4 should be populated in another cell

Ng-select, Multiselect; Multiselect checkbox; Output events; Virtual scroll; Dropdown position; Append to element; Grouping Most common case is showing data from backend API and with ng-select this is While array of objects is the most common items source, you may want to set simple array of Display data using ng-option. Need to report the video? adding scroll bar using dropdownlist properties in asp.net with code. How to Create Transparent Drop Down Navigation Menu with CSS and HTML Tutorial - Duration:

Comments
  • Have you tried to add the attribute size=8 in the html of the select?
  • @quirimmo Yeah, it just expands the actual field instead of giving the drop down area a scroll bar.
  • @JDo did you integrate it with the CSS overflow-y: scroll;
  • @quirimmo Yes. Just updated the question. As mentioned, it expands the actual field but it does give a scroll bar but I don't want it to increase the height of it.
  • Not a huge fan with how this looks but I suppose i'll use this for the time being. Thanks.
  • I know it is a little workaround but actually if you don't want to use CSS this looks like the easiest way to achieve what you need. If this fits your issue, please vote and accept is so that it can be useful for other people with the same issue too in the future
  • Just tried this and this resizes the actual field and it doesn't add a scroll bar?
  • In your CSS you miss a . It should be .scrollClass
  • Your ng-class should be inverted too
  • @CodeMan This doesn't work event if I just put ng-class='scrollClass'
  • @J.Do : my point is when the results count more than 8 we apply the class to the div.
  • @CodeMan I'm still getting this even if I apply the code you wrote: errors.angularjs.org/1.6.3/$parse/…