logo dile-components dile-components

dile-crud-actions

The dile-crud-actions component is responsible for displaying and processing batch actions that can be performed on CRUD elements.

Normally, you don't need to use this component on its own, as it is used internally by the dile-crud component to handle batch actions. However, we document it because you might want to listen to the custom events it dispatches, in order to display corresponding feedback messages to the user.

Properties

Validation of the action forms

When the user accepts an action, its form is validated with its validate() method, if it has one (forms with the DileForm mixin). If it is not valid, the action is not sent, the confirm dialog stays open with the errors in the fields and crud-action-invalid is dispatched.

Custom Events

{
    action, // The name of the action that was requested to be opened.
}
{
    msg, // The message returned by the server.
    action, // The name of the action that was processed, useful as certain actions may require response behaviors like interface refreshes or redirections.
    data: // Additional data that may be returned by the server.
}
{
    action, // The name of the action.
    errors, // The errors object, { fieldName: message }.
}
{
    msg, // The message returned by the server.
    errors, // The validation errors, { fieldName: message } (first message of each field)
}