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 "wx-svelte-gantt";

const data = getData();

let api;

$:if (api) {
api.intercept("show-editor", data => {
return false;
});
}

</script>

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

Related articles: How to access Gantt API