EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rezzonico on November 24, 2015, 02:13:45 AM



Title: Basic ComboBox demo
Post by: rezzonico on November 24, 2015, 02:13:45 AM
Hi all,

I am trying to modify the "Basic ComboBox" demo.
I only added an "onSelect" event and a "console.log" to output the selected value.

Please try the following link and write the word Alabama
Look into the WebConsole.
After writing Alabama in the WebConsole you see Alabam ... why not Alabama ?

http://195.144.40.170/jeasyui/EEE/index1.html

Thanks for any help.
Miche


Title: Re: Basic ComboBox demo
Post by: stworthy on November 24, 2015, 06:27:44 AM
The 'onSelect' event fires before 'onChange' event. Please use the 'onChange' event instead, or try the code below:
Code:
$('#state').combobox({
onSelect: function(item){
console.log(item.text)
}
})


Title: Re: Basic ComboBox demo
Post by: rezzonico on November 24, 2015, 08:38:29 AM
Thanks for your help !

Regards
Miche