Author Topic: Autoopen Select  (Read 2696 times)

conditio

  • Newbie
  • *
  • Posts: 2
    • View Profile
Autoopen Select
« on: December 05, 2017, 03:42:23 pm »
Hello,

i tryed to autoopen a select so the optionlist is directly shown in the editmode.
Code: [Select]
pqType: function (ui) {
return "select";
},
pqOptions: function (ui) {
return [
'R',
'F',
''
];
},
pqInit: function (ui) {
var $inp = ui.$editor.find('select');
$inp.prevObject.on('focus',function (e) {
this.pqSelect('open');
});
},

Thx for your help.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Autoopen Select
« Reply #1 on: December 05, 2017, 06:12:02 pm »
Could you please elaborate your question and share a jsfiddle.

conditio

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Autoopen Select
« Reply #2 on: December 05, 2017, 07:26:03 pm »
http://jsfiddle.net/mmg0cn30/

I want that the column state shows all options when I click at it. not only the select element. the select element should expand automaticly.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Autoopen Select
« Reply #3 on: December 07, 2017, 09:12:06 pm »
Please use this code for auto open pqSelect editor in Shipping Via column in this example: https://paramquery.com/pro/demos/editing_custom

Code: [Select]
            init: function (ui) {
                var $ed = ui.$cell.find("select")
$ed.pqSelect();
setTimeout(function(){
$ed.pqSelect('open');
})
            },

Hope it helps.