I need to make the autocomplete accompany the textarea when it is increased.
<form class="form-control form-inline">
<label for="tags" class="control-label" id="upBody">Component: </label>
<textarea id="tags" ng-model="components"
class="search ng-pristine ng-touched ui-widget"
placeholder="Insert a component" autocomplete="on">
</textarea>
<button ng-click="search(components)"
class="btn btn-primary">See objects
</button>
</form>
.autocomplete({
appendTo: "#upBody",
minLength: 0,
source: function( request, response ) {
response( $.ui.autocomplete.filter(
availableTags, extractLast( request.term ) ) );
},
focus: function() {
return false;
},
select: function( event, ui ) {
var terms = split( this.value );
terms.pop();
terms.push( ui.item.value );
terms.push( "" );
this.value = terms.join( ", " );
return false;
}
});
.ui-autocomplete {
position: relative;
overflow-y: auto;
overflow-x: hidden;
max-height: 150px;
}