Created
October 20, 2019 13:35
-
-
Save hoangbits/375d652936099e2ce0c465e45ed3c97f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { AgRendererComponent } from "ag-grid-angular/main"; | |
import { ICellRendererParams } from "ag-grid-community"; | |
@Component({ | |
selector: 'app-ag-grid-material-checkbox-cell', | |
template: `<mat-checkbox (change)="toggleSelection($event)"></mat-checkbox>` | |
}) | |
export class AgGridMaterialCheckboxCellComponent implements OnInit, AgRendererComponent { | |
private params: ICellRendererParams; | |
refresh(params: any): boolean { | |
return true; | |
} | |
agInit(params: ICellRendererParams): void { | |
this.params = params; | |
} | |
constructor() { } | |
ngOnInit() { | |
} | |
toggleSelection(event) { | |
this.params.node.setSelected(event.checked); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment