EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on January 10, 2016, 04:30:58 AM



Title: Combobox sticky group header [solved]
Post by: devnull on January 10, 2016, 04:30:58 AM
I thought that some of you may find this useful:

http://jsfiddle.net/54v8nacp/15/

The group header will stick to the top of the panel during scrolling which is useful if the group has more than just a few items.

Would be nice if this could be included as a standard feature in a future release ?





Title: Re: Combobox sticky group header [solved]
Post by: jarry on January 14, 2016, 08:16:05 PM
Set the 'groupPosition' property to 'sticky' to get this feature.
Please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4.4-patch.zip.
Code:
$('#cc').combobox({
  groupPosition: 'sticky'
});

The updated example is available from http://jsfiddle.net/54v8nacp/16/


Title: Re: Combobox sticky group header [solved]
Post by: devnull on January 15, 2016, 07:18:48 PM
Jarry;

Thanks so much, I am still using 1.4.1 which has a lot of hacks and fixes and are slowly testing 1.4.4 so that I can upgrade to the latest.

Aother really neat feature would be to allow a sub-group (just one) and then allow the groupFormatter to be able to access the groupField and the subGroupField so that it could do something like this:

Code:
groupFormatter: function(grp, sub){
 return grp +' - '+ sub;
}

:-)