Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

216
Visualizações
ExtJS 3 keep combobox always expanded

I am currently working on an old project with ExtJS 3.0.0, without possibility to upgrade version. My goal is to make a combobox always open, so that the user does not have to click the arrow in order to view the options.

I found out that by overriding the collapse event listener, I can prevent the combobox from closing once it is expanded

   myCombo.addListener(
        'collapse',
        function() { 
            this.expand();
         }
    );

However I cannot find any way to expand it programmatically once the panel is rendered. I experimented with specialkey and keypress events, but I do not know how they should be triggered.

Any ideas on how I could achieve this?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

a key press event should work as following,

you could try (extjs):

new Ext.form.TextField({
    ...
    enableKeyEvents: true,
    listeners: {
        keyup: function(form, e) {
            alert(e.getKey()); 
            if (e.getKey() == "keyA"){
                  alert("key A has been pressed");
           }
        }
    }
}); 

or try (js):

    listen: function () {
        document.addEventListener('keydown', function (key) {
            if (key.keyCode === 87){
          alert("pressed W")
           }
        });

for a list of keycodes visit https://gist.github.com/lbj96347/2567917

more information could be found here aswell https://forum.sencha.com/forum/showthread.php?52786-about-textfield-keypress-event

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda