Skip to main content

delete-link

Description

Fires when deleting a link

Usage

"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();

let api;

$: if (api) {
api.on("delete-link", ev => {
console.log("The id of the deleted link:" (ev.id));
});
}

</script>

<Gantt
bind:api
tasks={data.tasks}
links={data.links}
//other settings />

Related articles: How to access Gantt API