render-data
Description
Fires when data is rendered when scrollingUsage
"render-data": ({
from: number,
start: number,
end: number
}) => boolean|void;
Parameters
The callback of the action takes an object with the following parameters:
from- (required) the point in pixels where visible rows startstart- (required) the ID of the first visible rowend- (required) the ID of the last row within the visible area
info
For handling the actions you can use the Event Bus methods
Example
<script setup>
import { getData } from "../data";
import { Gantt } from "@svar-ui/vue-gantt";
const data = getData();
const init = (api) => {
api.on("render-data", (ev) => {
console.log("The ID of the last visible row", ev.end);
});
}
</script>
<template>
<Gantt :init="init" :tasks="data.tasks" :links="data.links" :scales="data.scales" />
</template>
Related articles: How to access Gantt API