request-data
Description
Fires when data for a task branch is requestedUsage
"request-data": ({
id: string | number
}) => boolean | void;
Parameters
The callback of the request-data action can take an object with the following parameters:
id- (required) the task ID for which data is requested
info
For handling the actions you can use the Event Bus methods
Example
<script setup>
import { getData } from "./common/data";
import { Gantt } from "@svar-ui/vue-gantt";
const data = getData();
function init(api) {
api.on("request-data", ({ id }) => {
console.log("Data request for: " + id);
});
}
</script>
<template>
<Gantt
:tasks="data.tasks"
:init="init" />
</template>
Related articles: How to access Gantt API