Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SplitButton broken in Table body when screen is less than 960px wide #17750

Open
4 tasks done
Exac opened this issue Feb 22, 2025 · 0 comments
Open
4 tasks done

SplitButton broken in Table body when screen is less than 960px wide #17750

Exac opened this issue Feb 22, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@Exac
Copy link

Exac commented Feb 22, 2025

Describe the bug

Hi everyone,

Thanks for the hard work on this library.

I have a problem where the popup menu in a p-splitButton is not playing nicely when inside a p-table row.

  1. A p-splitButton in the last row of a table does not open it's dropdown:
20250222-2306-36.8281385.mp4
  1. When the screen is less than 960px wide, the p-splitButton's menu changes the width of the cell/column when opened, and reverts when closed.
20250222-2309-57.6036576.mp4
  1. The more MenuItems, the more change in size of the table cell/row.
20250222-2318-05.6565670.mp4

Here is a StackBlitz reproduction in Angular 19 as the default issue reproducer links to Angular 18.

This appears to be a regression, as the p-splitButton was working in Angular 16 with PrimeNG 16.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

I don't know if we are using the Table or SplitButton incorrectly. This code was working as expected on PrimeNG 16.

Reproducer

Angular 19
https://stackblitz.com/edit/stackblitz-starters-hsjo6ot4?file=package.json

Angular 18
https://stackblitz.com/edit/github-adbwvdnw?file=src%2Fapp%2Fapp.component.ts

Environment

This is reproducible on StackBlitz in Chrome and Firefox.

The bug is present in at least:

  • Angular 19.1.6 with PrimeNG 19.0.6
  • Angular 19.0.6 with PrimeNG 19.0.7
  • Angular 18.0.1, PrimeNG 18.0.0-rc-1

And this same code worked in Angular 16.2.9.

Angular version

19.1.6

PrimeNG version

v19

Node version

20.18.3

Browser(s)

Firefox, Chrome

Steps to reproduce the behavior

  1. Open the StackBlitz example
  2. Resize StackBlitz preview window to less than 960px wide.
  3. Click the down chevron on the different SplitButtons in the first table example
  4. Resize the StackBlitz window above 960px and try again for all three
  5. Add more items to the MenuItems and try again to see the difference
  6. I included a couple other examples using appendTo="body" and breakpoint="9999px", but neither seem to help.

Expected behavior

The menu should open without changing the table's layout:

20250222-2330-49.5212305.mp4
@Exac Exac added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant