Action Execution
Action execution is the runtime path for delete, row actions, bulk actions, toolbar actions, and submit-backed create/update operations.
Resolution priority
resolveAction() chooses an execution source in this order:
action.handler.schema.handlers[action.key].schema.handlers[operation].schema.provider.action.endpointorschema.endpoint.none.
Handlers win over providers and endpoints. Providers win over direct endpoint execution.
Handler action
TS
export const usersSchema = {
resource: "users",
actions: {
row: [
{
key: "archive",
label: "Archive",
handler: "users.archive"
}
]
},
registry: {
actionHandlers: ["users.archive"]
}
} as const;TS
import { createRegistry } from "@vibeflui/core";
export const registry = createRegistry({
actionHandlers: {
"users.archive": async ({ row }) => {
return {
status: true,
code: 200,
message: `Archived ${String(row?.name ?? "user")}`
};
}
}
});Endpoint action
TS
export const usersSchema = {
resource: "users",
identity: {
key: "id",
param: "id"
},
actions: {
row: [
{
key: "archive",
label: "Archive",
endpoint: { url: "/api/users/:id/archive", method: "POST" }
}
]
}
} as const;Provider action
TS
export const usersSchema = {
resource: "users",
provider: {
type: "custom",
name: "admin"
},
actions: {
row: [
{ key: "archive", label: "Archive" }
]
}
} as const;TSX
const providers = {
admin: {
action: async ({ operation, params }) => {
return runUserAction(operation, params);
}
}
};Readonly mode
Readonly mode blocks mutation operations. Runtime still allows list, detail, view, and options.
Refresh behavior
After successful row, bulk, or toolbar actions, FluiKit reloads the list unless action.refreshOnSuccess === false.
Common mistakes
- When both
handlerandendpointare configured, handler resolution wins and the endpoint is passed only as context. - Row identity depends on
identity.keypointing to a value in the row. - Readonly UI mode disables mutation actions.