How to keep a fixed dropdown width in primevue?

UI Components for Vue
Post Reply
Posts: 1
Joined: 10 Mar 2020, 00:08

10 Mar 2020, 00:15


I am new to PrimeVue. I am using drop down component with single value selection in my application and I observed that the width of the drop down changes dynamically to match the currently selected value. Is there a way to keep the width of the drop down fixed irrespective of the changes in values?


Posts: 18269
Joined: 05 Jan 2009, 00:21
Location: Cybertron

12 Mar 2020, 17:50

You may use style or class props.

Code: Select all

<Dropdown :style="{min-width: '12em'}"

Code: Select all

<Dropdown :class="my-select}"

Code: Select all

.my-select {
 min-width: 12em;
or global;

Code: Select all

.p-dropdown {
 min-width: 12em;
Hope it helps.

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest