Line

You are reading docs for v0.8. See latest (v0.9)

ui/client/features/plan/hooks/useStepActions

Cockpit client (features), v0.8. Source: ui/client/features/plan/hooks/useStepActions.tsx.

Functions#

useStepActions()#

useStepActions(state, dispatch, flows): object

Defined in: ui/client/features/plan/hooks/useStepActions.tsx:10

Every edit of the step list. Each one only reshapes the list; whether the result is valid is the server's answer.

Parameters#

state

ScreenState

dispatch

Dispatch<ScreenAction>

flows

FlowInfo[]

Returns#

object

addStep

addStep: (flowId) => void

Parameters
flowId

string

Returns

void

addSuggested

addSuggested: () => void

Returns

void

move

move: (id, dir) => void

Parameters
id

string

dir

-1 | 1

Returns

void

remove

remove: (id) => void

Parameters
id

string

Returns

void

retag

retag: (id, e) => void

Parameters
id

string

e

Executor

Returns

void

setArg

setArg: (id, name, v) => void

Parameters
id

string

name

string

v

string

Returns

void

setTitle

setTitle: (id, title) => void

Parameters
id

string

title

string

Returns

void

suggestions

suggestions: Omit<PlanStep, "id">[]