redo
Description
Allows performing steps forward in historyIt's required to enable the undo property to perform the action.
Actions that can be undone: add-task, update-task, add-link, update-link, delete-task, delete-link, move-task, copy-task.
Hot key for the action: CTRL + Y
Usage
"redo": () => void;
Parameters
The callback of the action takes no parameters.
Example
We enable the redo action on a button click.
<script>
import { Gantt } from "@svar/svelte-gantt";
import { Button } from "@svar-ui/svelte-core";
import { getData } from "../data";
const { tasks, links } = getData();
let api = $state();
function redo() {
api.exec("redo");
}
</script>
<Button onclick={redo}>Redo</Button>
<Gantt bind:this={api} {tasks} {links} redo />
Related articles: