css - AngularJS: scrollable typeahead input field -
my html
<div class="form-group"> <label class='control-label col-md-4' for='id_paymentcurrency'>{{'payment_currency' | translate}}</label> <div class='col-md-4'> <div id="scrollable-dropdown-menu"> <input type="text" class="form-control" data-trim-value="false" ng-trim="false" id ='id_paymentcurrency' ng-model="vm.data.paymentcurrency" typeahead-append-to-body="true" required typeahead-editable="false" uib-typeahead="currency.code currency in vm.getcurrencies($viewvalue)"ng-disabled="disabled" /> </div> </div> </div>
my css
#scrollable-dropdown-menu .tt-menu { max-height: 150px; overflow-y: auto; }
i'm using angular 1.x , typeahead comes angular-bootsrap, can't make scrollbar appear.
the problem selector. try one:
#scrollable-dropdown-menu .dropdown-menu { max-height: 150px; overflow-y: auto; }
you can check working expected in fiddle
Comments
Post a Comment