idlClass="acqpl" [dataSource]="gridSource">
<eg-grid-toolbar-button label="New Selection List" i18n-label
- (onClick)="openCreateDialog()" [disableOnRows]="createNotAppropriate">
+ (onClick)="openCreateDialog()" [disabled]="createNotAppropriate()">
</eg-grid-toolbar-button>
<eg-grid-toolbar-action label="Clone Selected" i18n-label
(onClick)="openCloneDialog($event)" [disableOnRows]="cloneNotAppropriate">
permissions: {[name: string]: boolean};
noSelectedRows: (rows: IdlObject[]) => boolean;
oneSelectedRows: (rows: IdlObject[]) => boolean;
- createNotAppropriate: (rows: IdlObject[]) => boolean;
+ createNotAppropriate: () => boolean;
cloneNotAppropriate: (rows: IdlObject[]) => boolean;
mergeNotAppropriate: (rows: IdlObject[]) => boolean;
deleteNotAppropriate: (rows: IdlObject[]) => boolean;
this.noSelectedRows = (rows: IdlObject[]) => (rows.length === 0);
this.oneSelectedRows = (rows: IdlObject[]) => (rows.length === 1);
- this.createNotAppropriate = (rows: IdlObject[]) => (!this.permissions.CREATE_PICKLIST);
+ this.createNotAppropriate = () => (!this.permissions.CREATE_PICKLIST);
this.cloneNotAppropriate = (rows: IdlObject[]) => (!this.permissions.CREATE_PICKLIST || !this.oneSelectedRows(rows));
this.mergeNotAppropriate = (rows: IdlObject[]) => (!this.permissions.UPDATE_PICKLIST || this.noSelectedRows(rows));
this.deleteNotAppropriate = (rows: IdlObject[]) => (!this.permissions.UPDATE_PICKLIST || this.noSelectedRows(rows));