PrimeNG version 2.0.2
Putting this out there so that maybe it helps save someone else a couple hours of trial and error and searching.
on the contextMenu tag, use [style]="{'width':'12.5em'}"
I am showing the current default for the context menu. I had to bump mine up to 15em to get the menu items to fit nicely.
ContextMenu and MenuItem width
I know this thread is old, but the proper way to remove word wrapping and have the width adjust to fit the content is:
or from the css:
You can add "min-width: 12.5em" so that it doesnt shrink too much for smaller content
Code: Select all
[style]="{'white-space':'nowrap', 'width': 'auto'}"
Code: Select all
.ui-contextmenu{
white-space: nowrap;
width: auto;
}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 29 guests