summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.ts
blob: 407c745ae8351cc11e409a2ed06f2c9d63a63928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'rdp-checkbox-editor',
  styleUrls: ['./rdp-checkbox-editor.component.scss'],
  template:`
  <div id="property-active" class="property-active">
    <mat-checkbox name="isEnabled" [(ngModel)]="columnValue" [checked]="columnValue">{{columntitle}}
    </mat-checkbox>
  </div>
  `
})
export class RdpCheckboxEditorComponent implements OnInit {

  @Input() rowdata :any;
  @Input() columntitle: any
  columnValue: any;

  constructor() { }

  ngOnInit() {
    console.log("RdpCheckboxEditorComponent Row Data ::: ",this.rowdata);
    let rowObj = JSON.parse(this.rowdata);
    let column = this.columntitle;
    this.columnValue = rowObj[column];
  }

}