Class SamaTableComponent<T>

Table component to display rows of data.

Type Parameters

  • T

Implements

  • OnInit
  • OnDestroy
  • AfterViewInit

Constructors

Properties

dataLoader: DataLoader<T>

Object with DataLoader interface implementation.

emptyMessage: string = 'Sorry, no results match your request.'

Empty table user message.

hasPagination: boolean = true

Represents a flag to render or not the pagination.

highlightRowsConfig: {
    highlightByColumnName: string;
    highlightByValues: any[];
} = ...

Represents an config that to highlight rows based on it's properties. For example, your rows have structure like this: {id: number, name: string}. And you have two rows like these [{id: 1, name: "leo"}, {id:2, name:"bob"}, {id:3, name:"Alice"}] If you put highlightRowsConfig like this: {highlightByColumnName: "name", highlightByValues: ["bob", "Alice"]}, then the second and third rows will be highlighted.

isMoveRowsEnabled: boolean = false

Enables / disables moving rows (reordering using drag & drop).

isRowClickable: boolean = false

Represents a flag to trigger or not the row selection.

isScrollable: boolean = false

Represents a flag to enable or disable the table scrollable feature.

loadingRows: number = 10

Set the number of rows to be displayed when loading the table.

maxTableHeight: string = 'auto'

Max. Height of the table.

onClickedRow: EventEmitter<T> = ...

Represents the output to retrieve the row clicked.

onMovedRow: EventEmitter<RowMoved<T>> = ...

Event emitted every a row is moved to another position.

paginatorSizes: number[] = ...

Array with the paginator sizes.

selectedItemsChanges: EventEmitter<TableState<T>> = ...
showClickableArrow: boolean = false

Represents a flag to trigger or not arrow highlight on clickable rows.

showFooter: boolean = false

Represents a flag to render or not the footer.

sort: MatSort

Methods