Interface

ActionJSON

ActionJSON

Members

'record' | 'resource' | 'bulk'

# actionType

Type of an action

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 17

string | false | null

# component Optional

Action component. When set to false action will be invoked immediately after clicking it,

to put in another words: there wont be an action view

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 53

string | number | Array.<(string|number)>

# containerWidth

containerWidth passed from the action setup.

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 70

Record.<string, any>

# custom

Any custom options passed from the Action configuration.

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 103

string

# guard Optional

Guarding message which should be presented in `alert()` after clicking the action button

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 33

boolean

# hasHandler

Indicates if action has action handler defined

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 97

boolean

# hideActionHeader

Whether given action have an action header

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 65

string

# label

Action label - visible on the frontend

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 28

string

# resourceId

Id of a resource to which given action belongs.

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 75

boolean

# showFilter

If action should have a filter (for resource actions)

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 39

boolean

# showInDrawer

Whether given action should be seen in a drawer

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 60

boolean

# showResourceActions

If action should have resource actions buttons displayed above action header.

Defaults to true

View Source adminjs/src/frontend/interfaces/action/action-json.interface.ts, line 44

Type Definitions

object

# ParsedLayoutElement

It is generated from Array.<LayoutElement> passed in Action#layout
Properties:
Name Type Description
properties Array.<string>

List of paths to properties which should be rendered by given element

props PropsWithChildren.<any>

props passed to React component which wraps elements

layoutElements Array.<ParsedLayoutElement>

Nested layout elements

component string

Component which should be used as a wrapper

View Source adminjs/src/backend/utils/layout-element-parser/layout-element-parser.ts, line 95