EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on March 17, 2012, 11:01:18 PM



Title: combobox edit formatting
Post by: devnull on March 17, 2012, 11:01:18 PM
Hi;

on pressing a "Add New" button, I want to change the combobox by removing the drop arrow, making it editable but also, preventing the drop down search after text is keyed into the box.

I have tried using a long delay, which has the desired effect of preventing the drop down appearing, but the problem is the value of the combobox does not get the value of the textbox.

How can I prevent the drop down appearing but allow the combobox to get the entered value ??

Code:
$('.fkey').combobox({hasDownArrow:false,editable:true,delay:60000,width:'152'});


Title: Re: combobox edit formatting
Post by: stworthy on March 18, 2012, 06:39:18 PM
When the drop down panel display, try hide it immediately:

$('.fkey').combobox({
  hasDownArrow:false,
  onShowPanel:function(){
    $(this).combobox('hidePanel');
  }
});


Title: Re: combobox edit formatting - SOLVED
Post by: devnull on March 18, 2012, 07:57:08 PM
Brilliant !!

Thanks so much

Pete


Title: Re: combobox edit formatting
Post by: devnull on December 01, 2014, 06:39:59 AM
Hi;

This method of using a combobox as a text box appears to have stopped working in 4.1.

Code:
$('.fkey').combobox({
  hasDownArrow:false,
  onShowPanel:function(){
    $(this).combobox('hidePanel');
  }
});

The combobox value is no longer sent with the form submission, it worked great up until this version ?


Title: Re: combobox edit formatting
Post by: jarry on December 01, 2014, 05:26:13 PM
Please download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4.1-patch.zip, or use the textbox component instead.