Home Reference Source
import DataGridComponent from 'formiojs/src/components/datagrid/DataGrid.js'
public class | source

DataGridComponent

Extends:

src/components/_classes/nestedarray/NestedArrayComponent.js~NestedArrayComponent → DataGridComponent

Static Member Summary

Static Public Members
public static get

builderInfo: {"title": string, "icon": string, "group": string, "documentation": string, "weight": number, "schema": *}

Static Method Summary

Static Public Methods
public static

schema(extend: ...*): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public get
public get
public
public get
public set
public get
public get
public get
public set
public get
public

dragula: *

public get
public get
public get
public get
public get
public

rows: *[]

public
public
public

Method Summary

Public Methods
public

addRow()

public

attach(element: *): *

public

checkColumns(data: *, flags: {}): {"rebuild": *, "show": *}

public

checkComponentConditions(data: *, flags: *, row: *): *

public

checkValidity(data: *, dirty: *): *

Checks the validity of this datagrid.

public

createRowComponents(row: *, rowIndex: *): *

public

createRows(init: *, rebuild: *): *

public

getColumns(): *

public

getComponent(path: *, fn: *): *

public

Retrun group sizes.

public

Create groups object.

public

getRowChunks(groups: Number[], rows: Array<T>): Array<T[]>

Split rows into chunks.

public
public

getRows(): *

public
public
public

hasHeader(): *

public
public
public
public

init()

public

onReorder(element: *, _target: *, _source: *, sibling: *)

public

removeRow(index: *)

public
public

render(): *

public
public

setRowComponentsData(rowIndex: *, rowData: *)

public
public

setValue(value: *, flags: {}): *

public

toggleGroup(element: *, index: *)

public

totalRowsNumber(groups: *): *

Static Public Members

public static get builderInfo: {"title": string, "icon": string, "group": string, "documentation": string, "weight": number, "schema": *} source

Static Public Methods

public static schema(extend: ...*): * source

Params:

NameTypeAttributeDescription
extend ...*

Return:

*

Public Constructors

public constructor() source

Public Members

public get addAnotherPosition: * source

public get allowReorder: * source

public get canAddColumn: * source

public components: * source

public get dataValue: * source

public set dataValue source

public get datagridKey: string source

public get defaultSchema: * source

public get defaultValue: * source

public set disabled source

public get disabled: * source

public dragula: * source

public get emptyValue: * source

public get initEmpty: * source

public get initRows: * source

public get iteratableRows: * source

public get minLength: * source

public rows: *[] source

public tabIndex: number source

public type: string source

public visibleColumns: {} source

Public Methods

public addRow() source

public attach(element: *): * source

Params:

NameTypeAttributeDescription
element *

Return:

*

public checkColumns(data: *, flags: {}): {"rebuild": *, "show": *} source

Params:

NameTypeAttributeDescription
data *
flags {}
  • optional
  • default: {}

Return:

{"rebuild": *, "show": *}

public checkComponentConditions(data: *, flags: *, row: *): * source

Params:

NameTypeAttributeDescription
data *
flags *
row *

Return:

*

public checkValidity(data: *, dirty: *): * source

Checks the validity of this datagrid.

Params:

NameTypeAttributeDescription
data *
dirty *

Return:

*

public createRowComponents(row: *, rowIndex: *): * source

Params:

NameTypeAttributeDescription
row *
rowIndex *

Return:

*

public createRows(init: *, rebuild: *): * source

Params:

NameTypeAttributeDescription
init *
rebuild *

Return:

*

public getColumns(): * source

Return:

*

public getComponent(path: *, fn: *): * source

Params:

NameTypeAttributeDescription
path *
fn *

Return:

*

public getGroupSizes(): Number[] source

Retrun group sizes.

Return:

Number[]

public getGroups(): Object source

Create groups object. Each key in object represents index of first row in group.

Return:

Object

public getRowChunks(groups: Number[], rows: Array<T>): Array<T[]> source

Split rows into chunks.

Params:

NameTypeAttributeDescription
groups Number[]

array of numbers where each item is size of group

rows Array<T>

rows collection

Return:

Array<T[]>

public getRowValues(): * source

Return:

*

public getRows(): * source

Return:

*

public hasBottomSubmit(): * source

Return:

*

public hasExtraColumn(): * source

Return:

*

public hasHeader(): * source

Return:

*

public hasRemoveButtons(): * source

Return:

*

public hasRowGroups(): * source

Return:

*

public hasTopSubmit(): * source

Return:

*

public init() source

public onReorder(element: *, _target: *, _source: *, sibling: *) source

Params:

NameTypeAttributeDescription
element *
_target *
_source *
sibling *

public removeRow(index: *) source

Params:

NameTypeAttributeDescription
index *

public removeRowComponents(row: *) source

Params:

NameTypeAttributeDescription
row *

public render(): * source

Return:

*

public restoreComponentsContext() source

public setRowComponentsData(rowIndex: *, rowData: *) source

Params:

NameTypeAttributeDescription
rowIndex *
rowData *

public setStaticValue(n: *) source

Params:

NameTypeAttributeDescription
n *

public setValue(value: *, flags: {}): * source

Params:

NameTypeAttributeDescription
value *
flags {}
  • optional
  • default: {}

Return:

*

public toggleGroup(element: *, index: *) source

Params:

NameTypeAttributeDescription
element *
index *

public totalRowsNumber(groups: *): * source

Params:

NameTypeAttributeDescription
groups *

Return:

*