EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: pmjenn on February 02, 2013, 08:08:35 AM



Title: Setting the z-index for combobox
Post by: pmjenn on February 02, 2013, 08:08:35 AM
When using easy-ui combobox on a select inside a modal dialog, the z-index is not set high enough, causing the dropdown to appear behind the modal dialog. The modal dialog is not easy-ui.

Is there a way to set the z-index by using the onShowPanel option?

   $('#mySelect').combobox({
      onShowPanel: function(){
                           .... something here?
      },
       data:myOptions,
       valueField:'optionValue',
       textField:'optionLabel'
   });

I saw a similar question regarding Message Alert Window, but I'm not sure if the same approach would work for combo/combobox.


Title: Re: Setting the z-index for combobox
Post by: stworthy on February 03, 2013, 04:31:55 AM
Call 'panel' method to get the drop down panel object.
Code:
var p=$(this).combobox('panel');
p.panel('panel').css(...);


Title: Re: Setting the z-index for combobox
Post by: pmjenn on February 05, 2013, 05:46:25 AM
A simple solution for a simple problem. Thanks.