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

Contexte menu item [enabled] does not work #202

Open
Anthony-Breneliere opened this issue Apr 27, 2020 · 0 comments
Open

Contexte menu item [enabled] does not work #202

Anthony-Breneliere opened this issue Apr 27, 2020 · 0 comments

Comments

@Anthony-Breneliere
Copy link

Describe the bug
Context menu items are always enabled, event if [enabled]="false".

To Reproduce
Given the follwing menu:

<div  [class.borderhalo]="updating || notificationChange" [class.defaultBorder]="!(updating || notificationChange)"
    class="bouton_nav transition_1s" [class.unselected]="selected !== true" [class.selected]="selected === true" (click)="onClickInter()"
    [contextMenu]="buttonMenu" [contextMenuSubject]="intervention" >

    <div class="intervention_data" *ngIf="intervention"  >

        <ng-Content></ng-Content>

    </div>

</div>

<context-menu #buttonMenu>

    <ng-template contextMenuItem let-item passive="true">
        Actions sur {{intervention?.Id}}
    </ng-template>

    <ng-template [visible]="canTransfer" contextMenuItem let-item (execute)="transfer()">
        Transmettre
    </ng-template>

    <ng-template [visible]="inProgressPossible" contextMenuItem let-item (execute)="inProgress()">
      Arrivée sur site
    </ng-template>

    <ng-template [enabled]="false" [visible]="canClose" contextMenuItem let-item (execute)="close()">
        Clôturer
    </ng-template>

    <ng-template [visible]="canCancel" contextMenuItem let-item (execute)="cancel()">
        Annuler
    </ng-template>

</context-menu>

Expected behavior
The "Cloturer" button is never disabled.

Stackblitz Example
https://stackblitz.com/edit/ngx-contextmenu-example-c3rhro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant