DataGridComponent
Component Metadata
Section titled “Component Metadata”Selector: yuv-data-grid
Standalone: Yes
Implements: ControlValueAccessor, Validator
Inputs
Section titled “Inputs”classifications
Section titled “classifications”Type: string[]
Default Value: []
formControl
Section titled “formControl”Type: any
Default Value: undefined
formElement
Section titled “formElement”Type: Record<string, any> | undefined
Default Value: undefined
formFieldContext
Section titled “formFieldContext”Type: MetadataFormFieldContext
readonly
Section titled “readonly”Type: boolean
Default Value: false
situation
Section titled “situation”Type: Situation
Default Value: Situation.EDIT
Type: DataGridSizeType
Default Value: DataGridSizeType.AUTO
Properties
Section titled “Properties”dataSource
Section titled “dataSource”Type: unknown
Default Value: signal<any[]>([])
displayedColumns
Section titled “displayedColumns”Type: unknown
Default Value: linkedSignal<boolean, any[]>(\{ source: this.readonly, computation: (readonly, previous) => (readonly ? (previous?.value || []).filter((c: any) => c.columnDef !== 'actions') : previous?.value || []) \})
displayedColumnsWithActions
Section titled “displayedColumnsWithActions”Type: unknown
Default Value: linkedSignal<boolean, string[]>(\{ source: this.readonly, computation: (readonly, previous) => \{ if (readonly) \{ const idx = (previous?.value || []).findIndex((c) => c === 'actions'); if (idx && idx > -1) (previous?.value || []).splice(idx, 1); \} return previous ? previous.value : []; \} \})
Type: unknown
Default Value: inject(ElementRef<HTMLElement>)
Type: object
Default Value: \{ add: YUV_ICONS.add, more: YUV_ICONS.more \}
initalTableUpdate
Section titled “initalTableUpdate”Type: unknown
Default Value: true
isInvalid
Section titled “isInvalid”Type: unknown
Default Value: false
isRequired
Section titled “isRequired”Type: unknown
Default Value: false
mappedFormElement
Section titled “mappedFormElement”Type: unknown
Default Value: signal<Record<string, any> | undefined>(undefined)
onTouched
Section titled “onTouched”Type: unknown
Default Value: () => \{...\}
propagateChange
Section titled “propagateChange”Type: function
Default Value: () => \{...\}
selectedRow
Section titled “selectedRow”Type: unknown
Default Value: signal<unknown | null>(null)
tableLabel
Section titled “tableLabel”Type: unknown
Default Value: computed(() => \{ const formElement = this.formElement(); return formElement ? this.#systemService.getLocalizedResource(${formElement[‘name’]}_label) : formElement && formElement['label']; \})
translate
Section titled “translate”Type: unknown
Default Value: inject(TranslateService)
Methods
Section titled “Methods”addRow
Section titled “addRow”addRow(): voideditRow
Section titled “editRow”editRow(element: unknown): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| element | unknown |
onHostFocusOut
Section titled “onHostFocusOut”onHostFocusOut(ev: FocusEvent): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| ev | FocusEvent |
onMenuTrigger
Section titled “onMenuTrigger”onMenuTrigger(element: unknown | null): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| element | unknown | null |
onValueChange
Section titled “onValueChange”onValueChange(e: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| e | any |
registerOnChange
Section titled “registerOnChange”registerOnChange(fn: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| fn | any |
registerOnTouched
Section titled “registerOnTouched”registerOnTouched(fn: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| fn | any |
removeRow
Section titled “removeRow”removeRow(element: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| element | any |
setDisabledState
Section titled “setDisabledState”setDisabledState(isDisabled: boolean): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| isDisabled | boolean |
validate
Section titled “validate”validate(control: ObjectFormControl): anyArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| control | ObjectFormControl |
writeValue
Section titled “writeValue”writeValue(obj: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| obj | any |