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

P-Splitter: Can't change template visibility at runtime #15940

Open
R0binSmit opened this issue Jul 2, 2024 · 2 comments
Open

P-Splitter: Can't change template visibility at runtime #15940

R0binSmit opened this issue Jul 2, 2024 · 2 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working

Comments

@R0binSmit
Copy link

R0binSmit commented Jul 2, 2024

Describe the bug

I have probably found a bug in the P-Splitter. The misbehaviour relates to the restriction of the visibility of individual areas within the P-Splitter. If I define a P-Splitter with two defined areas, I can restrict the visibility of the areas using the "ng-templates" & "ngIf" (see test case 1 from my example). However, it is not possible to change the visibility at runtime (see test case 2 from my example). There I used "setTimeOut" to change the visibility of an area to "hidden" after 5 seconds. However, this has no influence on the DOM.

Environment

  • Microsoft Windows 11 Pro
  • IDE: Visual Studio 2022

Reproducer

https://stackblitz.com/edit/stackblitz-starters-onvsgv

Angular version

18.0.0

PrimeNG version

17.18.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

17.18.2

Browser(s)

No response

Steps to reproduce the behavior

  1. Implement a P-Splitter with two templates
  2. Restrict the visibility of one template by "*ngIf" and a boolean
  3. Change the visibility restriction at runtim (by setTimeOut for example)

Expected behavior

After changing the Boolean value in *ngIf, the change is taken into account and the DOM is adjusted accordingly (set template visibility).

@R0binSmit R0binSmit added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 2, 2024
@R0binSmit R0binSmit changed the title Component: P-Splitter can't change template visibility P-Splitter: Can't change template visibility at runtime Jul 2, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 2, 2024
@mehmetcetin01140
Copy link
Contributor

Hi, as a workaround until the issue is fixed, you can use this: https://stackblitz.com/edit/stackblitz-starters-ptlv7q?file=src%2Fmain.ts.

@R0binSmit
Copy link
Author

Thanks for your quick response. The workaround works fine 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants