show-editor
Description
Fires when opening the Editor dialog for a taskUsage
"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();
function init(api){
api.intercept("show-editor", data => {
return false;
});
}
</script>
<Gantt tasks={data.tasks} {init} />
Related articles: How to access Gantt API