src/app/components/table/table.component.ts
Displays a table with provided data
selector | ccf-table |
styleUrls | ./table.component.scss |
templateUrl | ./table.component.html |
Properties |
|
Methods |
Inputs |
Accessors |
additionalColumnsData | |
Type : string[]
|
|
Column definitions of additional columns to be displayed |
additionalHeaders | |
Type : ExtraHeader[]
|
|
Details of additional columns to be displayed |
cellHeaders | |
Type : ExtraHeader[]
|
|
Details of cell columns to be displayed |
cellHeadersData | |
Type : string[]
|
|
Column definitions of cell columns to be displayed |
columns | |
Type : HeaderData[]
|
|
Default value : []
|
|
Details of the columns to be displayed |
displayedColumns | |
Type : string[]
|
|
Default value : []
|
|
Column definitions of the columns to be displayed |
isOrgan | |
Type : boolean
|
|
Default value : false
|
|
Flag to check if column is of organ |
isTotal | |
Type : boolean
|
|
Default value : false
|
|
Flag to show/hide the total below the table |
typeCount | |
Type : TableData[]
|
|
Sets the data to the table datasource |
formatData | ||||
formatData(value)
|
||||
Return's 'no data' if column cell is null
Parameters :
Returns :
string
|
getAlignmentClass | ||||||
getAlignmentClass(column: HeaderData)
|
||||||
Returns an alignment class for the column
Parameters :
Returns :
string
|
getTotal | ||||||
getTotal(id: string)
|
||||||
Returns sum of numbers in a column
Parameters :
Returns :
any
|
isNumericColumn | ||||||
isNumericColumn(column: string)
|
||||||
Returns if column has atleast one number
Parameters :
Returns :
boolean
|
Readonly dataSource |
Default value : new MatTableDataSource<TableData>([])
|
Datasource to store table data |
sort | ||||||
setsort(value: MatSort)
|
||||||
Sorts the current selected data
Parameters :
Returns :
void
|
typeCount | ||||||
settypeCount(data: TableData[])
|
||||||
Sets the data to the table datasource
Parameters :
Returns :
void
|
firstColumnId |
getfirstColumnId()
|
Returns the column definition of first column
Returns :
string
|
./table.component.scss