Skip to content

EntityAction

@firecms/core


@firecms/core / EntityAction

EntityAction<M, USER> = object

Defined in: types/entity_actions.tsx:13

An entity action is a custom action that can be performed on an entity. They are displayed in the entity view and in the collection view.

M extends object = any

USER extends User = User

optional collapsed: boolean

Defined in: types/entity_actions.tsx:54

Show this action collapsed in the menu of the collection view. Defaults to true If false, the action will be shown in the menu


optional icon: React.ReactElement

Defined in: types/entity_actions.tsx:35

Icon of the action


optional includeInForm: boolean

Defined in: types/entity_actions.tsx:59

Show this action in the form, defaults to true


optional isEnabled: (props) => boolean

Defined in: types/entity_actions.tsx:47

Optional callback in case you want to disable the action

EntityActionClickProps<M, USER>

boolean


optional key: string

Defined in: types/entity_actions.tsx:30

Key of the action. You only need to provide this if you want to override the default actions, or if you are not passing the action directly to the entityActions prop of a collection. You can define your actions at the app level, in which case you must provide a key. The default actions are:

  • edit
  • delete
  • copy

name: string

Defined in: types/entity_actions.tsx:17

Title of the action


onClick: (props) => Promise<void> | void

Defined in: types/entity_actions.tsx:41

Callback when the action is clicked

EntityActionClickProps<M, USER>

Promise<void> | void