EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on March 23, 2016, 04:08:52 PM



Title: combobox onSelect() not fired by selected=true or during form load.
Post by: devnull on March 23, 2016, 04:08:52 PM
http://jsfiddle.net/FrEHv/384/

The onSelect() event is not fired if one of the data values is set to selected:true.

This needs to work for me, as combobox values are loaded via ajax and this selected value then needs to trigger loading of other data on the page for the record where selected = true.

Also, when loading a form containing a combobox, the onSelect() event also does not fire, this means that when loading a form that contains a combo and that combo is supposed to show / load other info based on it's selection, it does not work.







Title: Re: combobox onSelect() not fired by selected=true or during form load.
Post by: stworthy on March 23, 2016, 06:40:41 PM
You should use the 'onChange' event instead. This event fires when the field value is changed, no matter the data is loaded or not.


Title: Re: combobox onSelect() not fired by selected=true or during form load.
Post by: devnull on March 23, 2016, 06:47:14 PM
Thanks, but the problem is that the onchange event fires during each character input and not on select.

Is it not possible to add a feature to enable selectOnLoad = true / false ??

I have a lot of existing code and don't want to have to re-write it all.


Title: Re: combobox onSelect() not fired by selected=true or during form load.
Post by: stworthy on March 24, 2016, 01:25:31 AM
This problem has been solved. Please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4.5-patch.zip.