cell.getId() giving error "Cannot read property 'getId' of undefined"
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 867
- PR merge metrics
- No merged PRs in 30d
Description
Hi
I am trying to implement custom input validation in ng2-smart-table custom input filed but i am getting error cell.getId() giving error "Cannot read property 'getId' of undefined"
i am folwing : https://github.com/akveo/ng2-smart-table/pull/455
here my code is
import { Component, ViewChild, ElementRef, AfterViewInit, Input, OnInit, Output, EventEmitter } from '@angular/core';
import { Cell, DefaultEditor, Editor } from 'ng2-smart-table';
import { TestService } from './test.service';
import { FormGroup, FormBuilder, FormControl, Validators, NgForm } from '@angular/forms';
@Component({
template: `
`,
styleUrls: ['./ng2-smart-table-button.component.css']
})
export class InputRenderComponent extends DefaultEditor implements OnInit {
renderValue: any;
tableRowData: any;
@Input() value;
@Input() rowData: any;
constructor(private tsService: TestService) {
super();
this.renderValue = '';
// this.tableRowData = '';
}
ngOnInit() {
this.renderValue = this.value;
this.tableRowData = this.rowData;
}
onTextchange(data) {
const dataObj = {
id: data.id,
value: data.value
};
this.tsService.subVal.next(dataObj);
this.tsService.sub.next(dataObj);
}
}
Please is there any wrong in my code
Thanks,
Satya
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.