akveo / akveo/ng2-smart-table

cell.getId() giving error "Cannot read property 'getId' of undefined"

Open
#618 0 comments 1 reaction 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.