# Class SelectedRowsDirective<Data>

#### Type Parameters

- Data extends Record<string, any>

#### Implements

- OnInit
- OnDestroy

- Defined in packages/angular/material/table-system/src/lib/select-row/selected-rows.directive.ts:25

#####
Index

### Constructors

constructor

### Methods

ngOnDestroy
ngOnInit

##
Constructors

### constructor

- new SelectedRowsDirective<Data extends Record<string, any>>(
  template: TemplateRef<SelectedRowsDirectiveContext<Data>>,
  viewContainerRef: ViewContainerRef,
  cdr: ChangeDetectorRef,
  selectRowService: SelectRowService<Data>,
  ): SelectedRowsDirective<Data>

  #### Type Parameters

  - Data extends Record<string, any>

  #### Parameters

  - template: TemplateRef<SelectedRowsDirectiveContext<Data>>
  - viewContainerRef: ViewContainerRef
  - cdr: ChangeDetectorRef
  - selectRowService: SelectRowService<Data>

  #### Returns SelectedRowsDirective<Data>

  - Defined in packages/angular/material/table-system/src/lib/select-row/selected-rows.directive.ts:29

##
Methods

### ngOnDestroy

- ngOnDestroy(): void

  A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

  #### Returns void

  Implementation of OnDestroy.ngOnDestroy

  - Defined in packages/angular/material/table-system/src/lib/select-row/selected-rows.directive.ts:41

### ngOnInit

- ngOnInit(): void

  A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

  #### Returns void

  Implementation of OnInit.ngOnInit

  - Defined in packages/angular/material/table-system/src/lib/select-row/selected-rows.directive.ts:45