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-sidebar: can't open onInit #14605

Closed
che-ressoucenmangel opened this issue Jan 22, 2024 · 2 comments
Closed

p-sidebar: can't open onInit #14605

che-ressoucenmangel opened this issue Jan 22, 2024 · 2 comments
Labels
Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response Type: Bug Issue contains a bug related to a specific component. Something about the component is not working

Comments

@che-ressoucenmangel
Copy link

Describe the bug

When i use the p-sidebar-component und want to display it onInit, the sidebar seems to be called multiple times.

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [CommonModule, RouterOutlet, CardModule, ButtonModule, SidebarModule],
  templateUrl: './app.component.html',
  styleUrl: './app.component.scss'
})

export class AppComponent {
  sidebarVisible = true; // same issue when i call it in the constructor or onInit or any other Livecycle-Hook
}

app.component.html:

<p-sidebar [(visible)]="sidebarVisible">
  <h3>Sidebar</h3>
  <p>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
  </p>
</p-sidebar>
<p-button (click)="sidebarVisible = true" icon="pi pi-arrow-right"></p-button>

I would like to load components inside the Sidebar onInit for a router-outlet. So for specific urls you can directly access the sidebar-content.
But with this bug this is not possible. You can close the Sidebar itself (this is only exist once) - but the mask is generated multiple times and you can just get rid of one, closing the sidebar.

I don't what to disable the mask. I know this would help, but i hope you can fix this or have another workaround :)

Thx for any help!

Environment

mac-os 13.6 (22G120)

Reproducer

No response

Angular version

17.0.5

PrimeNG version

17.3.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.0

Browser(s)

Google Chrome: Version 120.0.6099.216

Steps to reproduce the behavior

Just init the code below and you should see the Problem directly

Expected behavior

The sidebar and mask should only show once.

@che-ressoucenmangel che-ressoucenmangel added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 22, 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 Feb 5, 2024
Copy link

github-actions bot commented Jun 6, 2024

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response label Jun 6, 2024
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response 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