Forum Discussion
emiljas
2 years agoFrequent Visitor
Incremental updates mode - do not load all data after switching to edit mode
Hi,
I created simple custom visual to test incremental updates mode:
public update(options: VisualUpdateOptions) {
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
console.log('VISUAL_UPDATE');
const dataView = options.dataViews[0];
const lenght = dataView.table.rows.length - ((dataView.table["lastMergeIndex"] === undefined) ? 0 : dataView.table["lastMergeIndex"] + 1);
if (options.operationKind === VisualDataChangeOperationKind.Create) {
console.log("CREATE", lenght);
}
else if (options.operationKind === VisualDataChangeOperationKind.Segment) {
console.log("SEGMENT", lenght);
}
if (options.dataViews[0].metadata.segment) {
console.log("REQUEST_ACCEPTED", this.host.fetchMoreData(false));
}
}
On report startup you can see this in developer console and it seems to be fine:
VISUAL_UPDATE
CREATE 15000
REQUEST_ACCEPTED true
VISUAL_UPDATE
SEGMENT 14999
REQUEST_ACCEPTED true
VISUAL_UPDATE
SEGMENT 14999
REQUEST_ACCEPTED true
VISUAL_UPDATE
SEGMENT 10077
Unfortunately when I switch to report editing then I can see this:
VISUAL_UPDATE
CREATE 10077
So I am getting only last segment. Is it expected behaviour? Am I missing something?
No RepliesBe the first to reply