delete-link
Description
Fires when deleting a linkUsage
"delete-link": ({
id: string | number;
}) => boolean|void;
Parameters
The callback of the delete-link action can take an object with the following parameters:
id
- (required) the ID of a link to be deleted
info
For handling the actions you can use the Event Bus methods
Example
<script>
import { getData } from "./common/data";
import { Gantt } from "wx-svelte-gantt";
const data = getData();
function init(api){
api.on("delete-link", ev => {
console.log("The id of the deleted link:", ev.id);
});
}
</script>
<Gantt
tasks={data.tasks}
links={data.links}
{init}
/>
Related articles: How to access Gantt API