Add scrollbar to product list

This commit is contained in:
Hillel Coren 2016-04-11 13:30:23 +03:00
parent 27f72a4730
commit 74b524aada
2 changed files with 10 additions and 1 deletions

View File

@ -22,6 +22,12 @@
width: 50%;
float: left;
}
#scrollable-dropdown-menu .tt-menu {
max-height: 150px;
overflow-y: auto;
overflow-x: hidden;
}
</style>
@stop
@ -221,7 +227,9 @@
$parent.invoice_items().length > 1" class="fa fa-sort"></i>
</td>
<td>
<input id="product_key" type="text" data-bind="typeahead: product_key, items: $root.products, key: 'product_key', valueUpdate: 'afterkeydown', attr: {name: 'invoice_items[' + $index() + '][product_key]'}" class="form-control invoice-item handled"/>
<div id="scrollable-dropdown-menu">
<input id="product_key" type="text" data-bind="typeahead: product_key, items: $root.products, key: 'product_key', valueUpdate: 'afterkeydown', attr: {name: 'invoice_items[' + $index() + '][product_key]'}" class="form-control invoice-item handled"/>
</div>
</td>
<td>
<textarea data-bind="value: wrapped_notes, valueUpdate: 'afterkeydown', attr: {name: 'invoice_items[' + $index() + '][notes]'}"

View File

@ -826,6 +826,7 @@ ko.bindingHandlers.typeahead = {
{
name: 'data',
display: allBindings.key,
limit: 50,
source: searchData(allBindings.items, allBindings.key)
}).on('typeahead:select', function(element, datum, name) {
@if (Auth::user()->account->fill_products)