Skip to main content

redo

PRO

The functionality is available in PRO Edition only

Description​

Allows performing steps forward in history

It'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 setup>
import { Gantt } from "@svar/vue-gantt";
import { Button } from "@svar-ui/vue-core";
import { getData } from "../data";
import { ref } from "vue";

const { tasks, links } = getData();

const api = ref();

function redo() {
api.value.exec("redo");
}
</script>
<template>
<Button :onclick="redo">Redo</Button>
<Gantt ref="api" :tasks="tasks" :links="links" redo />
</template>

Related articles: