mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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:
parent
5d1e297640
commit
123467af8e
@ -22,9 +22,12 @@
|
|||||||
$.widget( "ui.combobox", {
|
$.widget( "ui.combobox", {
|
||||||
_create: function() {
|
_create: function() {
|
||||||
var self = this;
|
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>" )
|
var input = $( "<input>" )
|
||||||
.insertAfter( select )
|
.insertAfter( select )
|
||||||
|
.val( value )
|
||||||
.autocomplete({
|
.autocomplete({
|
||||||
delay: 0,
|
delay: 0,
|
||||||
minLength: 0,
|
minLength: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user