Autocomplete (combobox demo): Set intial value of text field based on value of select element. Partial fix for #5757 - Autocomplete combobox issues.

This commit is contained in:
Scott González 2010-07-20 14:49:14 -04:00
parent 5d1e297640
commit 123467af8e

View File

@ -22,9 +22,12 @@
$.widget( "ui.combobox", {
_create: function() {
var self = this;
var select = this.element.hide();
var select = this.element.hide(),
selected = select.children( ":selected" ),
value = selected.val() ? selected.text() : "";
var input = $( "<input>" )
.insertAfter( select )
.val( value )
.autocomplete({
delay: 0,
minLength: 0,