Type Parameters

Hierarchy

Constructors

Properties

filter: TFilter<S, N>
formValues: RecordData
hasFieldChanged: ((fieldName: string) => boolean)

Type declaration

    • (fieldName: string): boolean
    • Parameters

      • fieldName: string

      Returns boolean

realCollection: Collection

Accessors

  • get caller(): Readonly<Caller>
  • Returns Readonly<Caller>

  • get changedField(): string
  • Deprecated

    use hasFieldChange instead. linked issue.

    Todo

    remove accessor

    Returns string

  • get collection(): default<S, N>
  • Returns default<S, N>

  • get dataSource(): default<S>
  • Returns default<S>

Methods

  • Get all the records ids (when the collection uses composite keys)

    Returns Promise<CompositeId[]>

  • Get all the records ids selected by an action

    Returns Promise<(string | number)[]>

  • Get all the records selected by an action

    Example

    .getRecords(['id', 'isActive', 'name']);
    

    Parameters

    • fields: TFieldName<S, N>[]

      An array of fields needed in the response

    Returns Promise<TRow<S, N>[]>

  • Stop hooks execution and send error to the UI

    Example

    .throwError('My error message');
    

    Parameters

    • message: string

      the error message

    Returns never

  • Stop hooks execution and send Forbidden error to the UI

    Example

    .throwForbiddenError('My forbidden error message');
    

    Parameters

    • message: string

      the forbidden error message

    Returns never

  • Stop hooks execution and send Validation error to the UI

    Example

    .throwValidationError('My validation error message');
    

    Parameters

    • message: string

      the validation error message

    Returns never