Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

299
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!