EasyUI Forum

General Category => Bug Report => Topic started by: arma on February 04, 2015, 11:46:33 PM



Title: Combobox selected but not returned any value
Post by: arma on February 04, 2015, 11:46:33 PM
I've faced this problem and can not find why. Here's my code on document ready.

Code:
$('#cb-year').combobox({
            valueField: 'id',
            textField: 'text'
});

$('#cb-year').combobox('loadData', years); //years is json variable
$('#cb-year').combobox('setValue', '2015')
;

When i click combobox, i see '2015' is higligted, but when i run $('#cb-year').combobox('getValue') in browser console, it returns empty string.
if i ('getData'), the data returned seems correct [{id:'2015', text: '2015'}, and so on].

Any clue why ?


Title: Re: Combobox selected but not returned any value
Post by: jarry on February 05, 2015, 12:40:13 AM
Please refer to http://jsfiddle.net/kkcf1d2w/


Title: Re: Combobox selected but not returned any value
Post by: arma on February 25, 2015, 03:02:25 AM
Hi Jarry,

I use 1.3.6. Do you have hosted minified jeasyui with that version, so i can change the external dependency/resource in you fiddle ?

Thanks.