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

303
Visualizações
ExtJS - Combobox Multiselect padding

I am using the Modern Toolkit of ExtJS 7.3.1, and I have found a strange behaviour in the Combobox styles when the multiSelect option is set to true. I have created a simple ExtJS application with two comboboxes. The only difference between them, is that one has the multiSelect option set to true, and the other one have it set to false. I include the code for this simple application below.

    Ext.application({
    name: 'Fiddle',

    launch: function () {
        Ext.create('Ext.form.Panel', {
            fullscreen: true,
            items: [{
                xtype: 'fieldset',
                items: [{
                    xtype: 'combobox',
                    label: 'State',
                    id: 'firstLabel',
                    name: 'stateMulti',
                    multiSelect: true,
                    displayField: 'name',
                    valueField: 'abbr',
                    store: [
                        { abbr: 'AL', name: 'Alabama' },
                        { abbr: 'AK', name: 'Alaska' },
                        { abbr: 'AZ', name: 'Arizona' }
                    ]
                },
                 {
                    xtype: 'combobox',
                    label: 'State',
                    id: 'secondLabel',
                    name: 'stateSingle',
                    multiSelect: false,
                    displayField: 'name',
                    valueField: 'abbr',
                    store: [
                        { abbr: 'AL', name: 'Alabama' },
                        { abbr: 'AK', name: 'Alaska' },
                        { abbr: 'AZ', name: 'Arizona' }
                    ]
                }]
            }]
        });
    }
   });

After running this application, I see that there is a small padding in the label when the multiSelect option is set to true, as it can be seen in the picture below. Is there any way to override this behaviour? I feel it has something to do with the style of the Modern Toolkit for multiselection comboboxes, but I am not sure. Any help will be appreciated.

Comboboxes

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

0

Add for modern - material to your CSS

.x-selectfield .x-chipview .x-chipview-body-el {
    padding: 0;
}

The difference is, that ExtJS adds a chipview, to allow multiselected items to be added in line.

Sidenote

For the multiselect I would strongly recommend to go for ExtJS 7.5, because the duplicate error for the first item is fixed there.

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