Skip to main content

show-editor

Description​

Fires when opening the Editor dialog for a task

Usage​

"show-editor": ({
id: string | number
}) => boolean|void;

Parameters​

The callback of the show-editor action can take an array where each object has the following parameters:

  • id - (required) the ID of the task for which the Editor dialog should be opened
info

For handling the actions you can use the Event Bus methods

Example​

In the example below we use api.intercept() to hide a default edit form by returning false.

<script>
import { getData } from "./common/data";
import { Gantt } from "@svar-ui/svelte-gantt";

const data = getData();

function init(api){
api.intercept("show-editor", data => {
return false;
});
}
</script>

<Gantt tasks={data.tasks} {init} />

Related articles: