DataStreamer
Description
The DataSteamer (beta) adds JSON streaming features to your DataGridXL instance, to display 500,000 rows in your data grid without blocking page load.
NOTE: This class is in beta and should not be used in production.
Usage
Your DataGridXL instance contains a property dataStreamer. (Only when the streamer option is used.)
javascript
// create DataGridXL instance
const grid = new DataGridXL(...);
// work with the DataStreamer instance
grid.dataStreamer.fetchStream((batch) => ...);
grid.dataStreamer.events.on('complete', ...);NOTE: You don't need to create a DataStreamer instance yourself — it is provided by the grid automatically.Methods
fetchStream(onBatch): Promise<boolean>Fetch stream
Arguments
onBatch
functionCallback function to handle batchReturns
Promise<boolean>Resolves when the stream has completedFires
$start$endEvents
completeDataStreamerEventFired when data stream is complete
Payload
typestringType of the event (e.g. 'dblclick', 'contextmenu')
targetDataStreamerInstance that fired the event
startDataStreamerEventFired when data stream starts
Payload
typestringType of the event (e.g. 'dblclick', 'contextmenu')
targetDataStreamerInstance that fired the event