### File

`src/table/body/table-expanded-row.component.ts`

### Metadata

selector | `[ibmTableExpandedRow]`
template |
    <td [attr.colspan]="row.length + 2">
    	<ng-container *ngIf="!firstExpandedTemplateInRow(row)">
    		{{firstExpandedDataInRow(row)}}
    	</ng-container>
    	<ng-template
    		[ngTemplateOutlet]="firstExpandedTemplateInRow(row)"
    		[ngTemplateOutletContext]="{data: firstExpandedDataInRow(row)}">
    	</ng-template>
    </td>

### Index

###### Methods
firstExpandedDataInRow firstExpandedTemplateInRow
###### Inputs
expanded row skeleton
###### HostBindings
class.bx--expandable-row

### Inputs

`expanded` | Default value : `false`
Defined in src/table/body/table-expanded-row.component.ts:29

`row` | Type : `any[]`
Defined in src/table/body/table-expanded-row.component.ts:23

`skeleton` | Default value : `false`
Defined in src/table/body/table-expanded-row.component.ts:25

### HostBindings

class.bx--expandable-row
`class.bx--expandable-row: ```
Default value : `true`
Defined in src/table/body/table-expanded-row.component.ts:27

### Methods

firstExpandedDataInRow
`firstExpandedDataInRow(row)`
Defined in src/table/body/table-expanded-row.component.ts:39
Parameters :
Name | Optional
row | No
Returns : `any`

firstExpandedTemplateInRow
`firstExpandedTemplateInRow(row)`
Defined in src/table/body/table-expanded-row.component.ts:31
Parameters :
Name | Optional
row | No
Returns : `any`

    import {
    	Component,
    	HostBinding,
    	Input
    } from "@angular/core";

    @Component({
    	// tslint:disable-next-line: component-selector
    	selector: "[ibmTableExpandedRow]",
    	template: `
    		<td [attr.colspan]="row.length + 2">
    			<ng-container *ngIf="!firstExpandedTemplateInRow(row)">
    				{{firstExpandedDataInRow(row)}}
    			</ng-container>
    			<ng-template
    				[ngTemplateOutlet]="firstExpandedTemplateInRow(row)"
    				[ngTemplateOutletContext]="{data: firstExpandedDataInRow(row)}">
    			</ng-template>
    		</td>
    	`
    })
    export class TableExpandedRow {
    	@Input() row: any[];

    	@Input() skeleton = false;

    	@HostBinding("class.bx--expandable-row") expandableRowClass = true;

    	@HostBinding("attr.data-child-row") @Input() expanded = false;

    	firstExpandedTemplateInRow(row) {
    		const found = row.find(d => d.expandedTemplate);
    		if (found) {
    			return found.expandedTemplate;
    		}
    		return found;
    	}

    	firstExpandedDataInRow(row) {
    		const found = row.find(d => d.expandedData);
    		if (found) {
    			return found.expandedData;
    		}
    		return found;
    	}
    }

Legend
Html element
Component
Html element with directive

# result-matching ""

# No results matching ""