EntityAction
@firecms/core / EntityAction
Type Alias: EntityAction<M, USER>
Section titled “Type Alias: EntityAction<M, USER>”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.
Type Parameters
Section titled “Type Parameters”M extends object = any
Properties
Section titled “Properties”collapsed?
Section titled “collapsed?”
optionalcollapsed: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
optionalicon:React.ReactElement
Defined in: types/entity_actions.tsx:35
Icon of the action
includeInForm?
Section titled “includeInForm?”
optionalincludeInForm:boolean
Defined in: types/entity_actions.tsx:59
Show this action in the form, defaults to true
isEnabled()?
Section titled “isEnabled()?”
optionalisEnabled: (props) =>boolean
Defined in: types/entity_actions.tsx:47
Optional callback in case you want to disable the action
Parameters
Section titled “Parameters”EntityActionClickProps<M, USER>
Returns
Section titled “Returns”boolean
optionalkey: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()
Section titled “onClick()”onClick: (
props) =>Promise<void> |void
Defined in: types/entity_actions.tsx:41
Callback when the action is clicked
Parameters
Section titled “Parameters”EntityActionClickProps<M, USER>
Returns
Section titled “Returns”Promise<void> | void