Hi,
We have PrimeNG Verona 9.0.0. We are about going live in our project. We got very curricial problem about Menu Item Visibility.
"name": "verona",
"version": "9.0.0",
"license": "PrimeNG Commercial",
Please check this issue ASAP.
Thank You
Ahmet
MenuItem "visible" properties doesn't work !!
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
Sorry for the delayed response! @merve Could you please check this issue?
Best Regards,
Sorry for the delayed response! @merve Could you please check this issue?
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
We added this feature to the next version. Please make the following changes for now;
Exp;
Best Regards,
We added this feature to the next version. Please make the following changes for now;
Code: Select all
//app.menuitem.component
@Component({
/* tslint:disable:component-selector */
selector: '[app-menuitem]',
/* tslint:enable:component-selector */
template: `
<ng-container *ngIf="visible">
...
</ng-container>
`,
host: {
'[class.active-menuitem]': 'active'
},
animations: [
...
]
})
export class AppMenuitemComponent implements OnInit, OnDestroy {
...
get visible():boolean {
return this.item ? (typeof this.item.visible === "function" ? this.item.visible() : this.item.visible !== false) : false;
}
}
Code: Select all
...
{label: 'Form Layout', icon: 'pi pi-fw pi-id-card', routerLink: ['/uikit/formlayout'], visible: false},
{label: 'Input', icon: 'pi pi-fw pi-check-square', routerLink: ['/uikit/input']},
{label: 'Float Label', icon: 'pi pi-fw pi-bookmark', routerLink: ['/uikit/floatlabel'], visible: () => { .... return false}},
{label: 'Button', icon: 'pi pi-fw pi-mobile', routerLink: ['/uikit/button'], class: 'rotated-icon'},
...
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
Yes, of course!
Best Regards,
Yes, of course!
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest