akveo / akveo/ng2-smart-table

rowData not available in onComponentInitFunction

Đang mở
#941 2 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
867
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

In the onComponentInitFunction the rowData property is not available. There is a way to make it available or is a new feature?

A solution can be:

replace in file https://github.com/akveo/ng2-smart-table/blob/master/src/ng2-smart-table/components/cell/cell-view-mode/custom-view.component.ts#L50 replace

onComponentInitFunction && onComponentInitFunction(this.customComponent.instance);

with

onComponentInitFunction && onComponentInitFunction(this.customComponent.instance, this.getPatch());

and then use as

...
onComponentInitFunction: (instance, rowData) => {
console.log(rowData);
}
...

OR call `this.patchInstance()` **before** calling `this.callOnComponentInit()`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.