I can't modify the P-dropdown size (large)

UI Components for Angular
Post Reply
juan186
Posts: 1
Joined: 10 Feb 2021, 12:50

10 Feb 2021, 12:53

I've a p-dropdown like this:

Code: Select all

                <p-dropdown
                    [options]="optionsArray" 
                    [filter]="true" 
                    [baseZIndex]="10008" 
                    id="txt1"
                    maxlength="10"
                    [style]="{'minWidth':'50px', 'width': '50px'}"
                    styleClass='dropdownClass'>
                </p-dropdown>
And I can't modify the large. Always displayed with the same width.

I've tested to put it in div, and modify div with width style, but doesn't work.

PhilHuhn
Posts: 49
Joined: 19 Sep 2018, 02:52

20 Feb 2021, 20:31

Hey:

I used [style]

Code: Select all

  <p-dropdown id='NoteTypeId' name='NoteTypeId' [options]='networkIncident.noteTypes'
    (onChange)='onTypeIdDropdownChanged( $event.value )' [style]="{'width':'180px'}" #NoteTypeId='ngModel'
    [(ngModel)]='model.NoteTypeId' placeholder='Select a type'>
  </p-dropdown>

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests