primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Dropdown doesn't allow small widths

Open bomberblue07 opened this issue 7 years ago • 1 comments

If you have a PrimeNG PRO Support subscription please post your issue at;

https://pro.primefaces.org

where our team will respond within 4 business hours.

If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.

Current Waiting Time: ~8 weeks.

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports) Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.

https://stackblitz.com/edit/github-jczj7f-cjxcpb

Current behavior

PrimeNG ignores Dropdown widths it considers to be too small. The problem is, the smallest I can make dropdowns is too large in my application (limited screen real estate). In the stackblitz, I set the dropdown to be 90px and it gets completely ignored.

Expected behavior

I need to be able to make the drowdowns whatever pixel width I want

Minimal reproduction of the problem with instructions See stackblitz for example

What is the motivation / use case for changing the behavior?

I need to make smaller drowdowns than the current version allows. Older versions used to let me.

Please tell us about your environment:

  • Angular version: 5.X
  • PrimeNG version: 5.X
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

It's getting really frustrating that you guys frequently completely re-implement components in supposedly bugfix-only releases (going by semantic version number). If there are intended breaking changes, you should go up a full version and have a migration guide.

bomberblue07 avatar Mar 14 '19 20:03 bomberblue07

Hi @bomberblue07

Set the min-width property and it will work as intended.

<p-dropdown [options]="cities" placeholder="Select a City" optionLabel="name" [style]="{'min-width':'90px'}">
</p-dropdown>

Best regards

thiagogjt avatar Mar 14 '19 22:03 thiagogjt