File

src/lib/components/table-row/table-row.component.ts

Description

Angular Component for the TableRow Control.

Extends

ControlComponent

Metadata

Index

Properties
Accessors

Constructor

constructor(refCh: ChangeDetectorRef, renderer2: Renderer2, element: ElementRef, webComponents: WebComponentsService, bringTopServ: BringTopService)

Creates an instance of TableRowComponent.

Parameters :
Name Type Optional
refCh ChangeDetectorRef No
renderer2 Renderer2 No
element ElementRef No
webComponents WebComponentsService No
bringTopServ BringTopService No

Properties

Private tableCellChildren
Type : QueryList<TableCellComponent>
Default value : new QueryList<TableCellComponent>()
Decorators :
@ContentChildren(TableCellComponent)

List of TableCell components.

Accessors

tableCells
gettableCells()

Gets the table cells array.

Returns : any[]
import {
  ChangeDetectionStrategy,
  ChangeDetectorRef,
  Component,
  ContentChildren,
  ElementRef,
  Optional,
  QueryList,
  Renderer2
} from '@angular/core';
import { dataTransfer, BringTopService } from '@mobilize/base-components';
import { ErrorCodes, ExceptionHandlerClass } from '@mobilize/webmap-core';
import {
  ControlComponent,
  WebComponentsService
} from '@mobilize/winforms-components';
import { TableCellComponent } from '../table-cell/table-cell.component';

/**
 * Angular Component for the TableRow Control.
 *
 * @export
 * @class TableRowComponent
 * @extends {ControlComponent}
 */
@Component({
  changeDetection: ChangeDetectionStrategy.OnPush,
  selector: 'wm-tablerow',
  templateUrl: './table-row.component.html',
  styleUrls: ['./table-row.component.scss'],
  inputs: ['model']
})
@dataTransfer(['tblrw'])
@ExceptionHandlerClass(ErrorCodes.Winforms)
export class TableRowComponent extends ControlComponent {
  /**
   * List of TableCell components.
   *
   * @private
   * @type {QueryList<TableCellComponent>}
   * @memberof TableRowComponent
   */
  @ContentChildren(TableCellComponent)
  private tableCellChildren: QueryList<TableCellComponent> =
    new QueryList<TableCellComponent>();

  /**
   * Creates an instance of TableRowComponent.
   *
   * @param {ChangeDetectorRef} refCh
   * @param {Renderer2} renderer2
   * @param {ElementRef} element
   * @param {WebComponentsService} webComponents
   * @param {BringTopService} bringTopServ
   * @memberof TableRowComponent
   */
  constructor(
    private refCh: ChangeDetectorRef,
    private renderer2: Renderer2,
    private element: ElementRef,
    webComponents: WebComponentsService,
    @Optional() private bringTopServ: BringTopService
  ) {
    super(refCh, renderer2, element, webComponents, bringTopServ);
  }

  /**
   * Gets the table cells array.
   *
   * @readonly
   * @type {any[]}
   * @memberof TableRowComponent
   */
  get tableCells(): any[] {
    return this.tableCellChildren.toArray();
  }
}
<ng-content></ng-content>

./table-row.component.scss

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""