Skip to content

Type SmartActionLoadHook does not support async function #804

@felipe-augusto

Description

@felipe-augusto

Expected behavior

The type should support an async function based on the docs described here: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions/use-a-smart-action-form#prefill-a-form-with-default-values

export interface SmartActionHooks {
  load: SmartActionLoadHook;
  change: Record<string, SmartActionChangeHook>;
}

export interface SmartActionLoadHook {
  (context: { fields: SmartActionLoadHookField[], request: SmartActionLoadHookRequest })
  : SmartActionLoadHookField[] | Promise<SmartActionLoadHookField[]>
}

Actual behavior

export interface SmartActionLoadHook {
  (context: { fields: SmartActionLoadHookField[], request: SmartActionLoadHookRequest }): SmartActionLoadHookField[] 
}

Context

  • Package Version: forest-express-sequelize@8.1.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions