EasyUI Forum
October 21, 2025, 01:04:25 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Combobox sticky group header [solved]  (Read 7651 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« 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 ?



« Last Edit: January 11, 2016, 04:19:35 AM by devnull » Logged

-- Licensed User --
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 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/
Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #2 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;
}

:-)

Logged

-- Licensed User --
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!