Viewport

The viewport delimits the area of the visible cells in the javascript grid. When the viewport is enabled JSS will handle the data rendering only the necessary visible cells. That means viewport is the most important configuration when dealing with a large amount of data.

The tableOverflow: true would enable the viewport along the properties tableWidth and tableHeight to define the viewport width and height respectively. It is also possible to use fullscreen: true to make sure all available screen area is used for cell rendering.

Those properties are defined at the worksheet level. It means the developer can choose different viewport sizes for each worksheet.

Documentation

Methods

The following methods interact with the worksheets viewport programmatically.
MethodDescription
setViewportinstance.setViewport(w: Number, h: number) => void
fullscreeninstance.fullscreen(state: Boolean) => void


Example

The follow example helps to change the viewport visible area dinamically.