File

context-dashboard/widget-config-hook/widget-config-hook.model.ts

Index

Properties

Properties

expanded
expanded: boolean
Type : boolean
Optional

Defines if the section should be by default expanded or collapsed.

initialState
initialState: Partial<T>
Type : Partial<T>
Optional

The initial state.

injector
injector: Injector
Type : Injector
Optional

The injector to be used.

label
label: string
Type : string

The label to show as headline of the section

priority
priority: number
Type : number
Optional

The priority. Default settings from hookWidget will have priority 0.

providers
providers: Type<unknown>[] | unknown
Type : Type<unknown>[] | unknown
Optional

Additional providers to be used only in scope of the configuration. If same Providers are provided multiple times, only one is used.

validationErrors
validationErrors: Record<string | string>
Type : Record<string | string>
Optional

Custom validation errors to display. Keys should match the error keys, values are the error messages.

validators
validators: ValidatorFn[]
Type : ValidatorFn[]
Optional

An array of validator functions to be applied to the main widget config form. These validators are added when the section is initialized and allow for custom validation logic (useful for cross-section or cross-fields validation).

Note: Validator must indicate the names of form controls (at least one) whose values affect the validation outcome. This can be done by setting a controlNames property on the validator function:

Example :
const myValidator: ValidatorFn = (formGroup: AbstractControl) => {
  // validation logic
};
(myValidator as any).controlNames = ['control1', 'control2'];

results matching ""

    No results matching ""