flexlayout-react
    Preparing search index...

    Interface IUseUndoResult

    The result of the useUndo hook

    interface IUseUndoResult {
        canRedo: boolean;
        canUndo: boolean;
        model: Model | null;
        redo: () => void;
        redoCount: number;
        reset: () => void;
        setModel: (model: Model, resetHistory?: boolean) => void;
        undo: () => void;
        undoCount: number;
    }
    Index
    canRedo: boolean

    true if there is at least one redo step available

    canUndo: boolean

    true if there is at least one undo step available

    model: Model | null

    the model to pass to the Layout component

    redo: () => void

    redo the most recently undone change, if any

    redoCount: number

    the number of redo steps available

    reset: () => void

    clear the undo/redo history without replacing the model

    setModel: (model: Model, resetHistory?: boolean) => void

    Replaces the model (e.g. after loading a layout). By default the undo/redo history is cleared; pass false as the second argument to keep it (for example for an in-place round-trip of the same model, which should not lose the history).

    undo: () => void

    undo the most recent change, if any

    undoCount: number

    the number of undo steps available