akveo / akveo/ng2-smart-table

Updating noDataMessage broke with commit 69e883c454405ca4b9dac4ee35cd9ee855f2c9f1

Đang mở
#486 1 bình luận 2 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ả

Before change 69e883c454405ca4b9dac4ee35cd9ee855f2c9f1 the following code would update the "noDataMessage". This appears to remain broken even as of the current commit 8f37d374a87a9008328aaea36ad6ce78a28ce7a8. Given the example below changes to the noDataMessage don't propagate to the view and it will remain at its initial value "Failed to load data.". Notice the Object.assign({}, this.settings) to force Angular change detection. Side note: Adding new columns after the initial load does work with more or less the same structure as below while at change 69e88...

`settings = {
noDataMessage: "Failed to load data.",
columns: {
info: {
title: 'Info'
},
};

ngOnInit() {
this.jobInfoSubscription = this.fvCoordService.getJobInfoList( 'AllJobs', this.cuid ).subscribe(
data => {
if ( data != null ) {
this.settings.noDataMessage = "Data received: " + data.length + " rows.";
this.source.load( data ).then(() => console.debug( 'Visible Rows ' + this.source.count() ) );
} else {
this.settings.noDataMessage = "Data received was null."
}
},
err => this.settings.noDataMessage = "Error: refreshJobDetails():" + err,
() => this.settings = Object.assign( {}, this.settings ) );
}`

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.