show-editor
Description
Fires when opening the Editor dialog for a taskUsage
"show-editor": ({
id: string | number | null
}) => boolean|void;
Parameters
The callback of the show-editor action can take an object with the following parameters:
id- (required) the ID of the task for which the Editor dialog should be opened; set tonullto close the Editor
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: