redo
Description
Allows performing steps forward in historyIt's required to enable the undo
property to perfrom the action.
Usage
["redo"]: () => void;
Parameters
The callback of the action takes no parameters.
Example
We enable the redo
action on a button click. The action cannot be executed in the tree
mode.
Actions that can be redone: add-row, update-row, update-cell, delete-row, move-item, collapse-column, resize-column, hide-column.
<script>
import { Button } from "wx-svelte-core"; // import the Button component
import { Grid } from "wx-svelte-grid";
import { getData } from "../data";
const { data, columns } = getData();
let api = $state();
function redo() {
api.exec("redo");
}
</script>
<Button onclick={redo}>Redo</Button>
<div style="height: 400px; margin-top: 10px;">
<Grid
bind:this={api}
{data}
{columns}
undo
/>
</div>
Related articles: