qlik-oss / sn-table

table supernova for nebula.js
https://qlik.dev/libraries-and-tools/visualizations/table
MIT License
6 stars 14 forks source link

fix: fix chart monitoring #1032

Closed quanho closed 1 year ago

quanho commented 1 year ago

For sn-table chart monitoring, there is a scenario where we have a virtualized table and we capture a snapshot of it on "Monitor hub" action, but then printing service tries to render this snapshot data (which we use pagination table to render it) and capture another snapshot after the pagination table is rendered. In this case we don't need to find visible rows anymore, since they are already stored in viewState.

Caele commented 1 year ago

You need to make sure you capture the case I used as well, where the viewstate isn't set but interaction is disabled, which I think means the table reverts to a paginated setup but without a viewstate.

quanho commented 1 year ago

You need to make sure you capture the case I used as well, where the viewstate isn't set but interaction is disabled, which I think means the table reverts to a paginated setup but without a viewstate.

We only use pagination table if either the table is a pagination table or layout.snapshotData || viewService.viewState?.visibleHeight is truthy. So you mean the case where viewService.viewState is falsy but therelayout.snapshotData is truthy? If it is so it should run onTakeSnapshot instead of getViewState.