EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: y.bykov on May 12, 2017, 06:57:49 AM



Title: Switch off reloading in combobox
Post by: y.bykov on May 12, 2017, 06:57:49 AM
How to switch off data autoreloading on 'disabled' option change?
I already loaded data (with 'url' option) and don't need load again.
Thank you.


Title: Re: Switch off reloading in combobox
Post by: stworthy on May 12, 2017, 09:21:30 AM
The data is loaded only once, please prevent from re-creating it again.


Title: Re: Switch off reloading in combobox
Post by: y.bykov on May 12, 2017, 10:27:51 AM
Do you mean I re-create combobox when call elem.combobox({disabled:true}) on previously configured elem?


Title: Re: Switch off reloading in combobox
Post by: stworthy on May 12, 2017, 04:29:19 PM
Calling $(elem).combobox({disabled:true}) will cause the component to be re-created again. Please call 'disable' method instead.
Code:
$(elem).combobox('disable');  // disable the combobox
$(elem).combobox('enable');  // enable it again