@ -56,6 +56,7 @@ import {
} from '../../tokens/extensions.token' ;
} from '../../tokens/extensions.token' ;
import { GridActionsComponent } from '../grid-actions/grid-actions.component' ;
import { GridActionsComponent } from '../grid-actions/grid-actions.component' ;
import { ExtensibleTableRowDetailComponent } from './extensible-table-row-detail' ;
import { ExtensibleTableRowDetailComponent } from './extensible-table-row-detail' ;
import { RowDetailContext } from '../../models/row-detail' ;
const DEFAULT_ACTIONS_COLUMN_WIDTH = 150 ;
const DEFAULT_ACTIONS_COLUMN_WIDTH = 150 ;
@ -136,8 +137,7 @@ export class ExtensibleTableComponent<R = any> implements OnChanges, AfterViewIn
@Output ( ) loadMore = new EventEmitter < void > ( ) ;
@Output ( ) loadMore = new EventEmitter < void > ( ) ;
@Input ( ) tableHeight : number ;
@Input ( ) tableHeight : number ;
// Row detail configuration (supports both direct template and child component)
@Input ( ) rowDetailTemplate? : TemplateRef < RowDetailContext < R > > ;
@Input ( ) rowDetailTemplate? : TemplateRef < { row : R ; expanded : boolean } > ;
@Input ( ) rowDetailHeight : string | number = '100%' ;
@Input ( ) rowDetailHeight : string | number = '100%' ;
@Output ( ) rowDetailToggle = new EventEmitter < R > ( ) ;
@Output ( ) rowDetailToggle = new EventEmitter < R > ( ) ;
@ -146,13 +146,11 @@ export class ExtensibleTableComponent<R = any> implements OnChanges, AfterViewIn
@ViewChild ( 'table' , { static : false } ) table ! : DatatableComponent ;
@ViewChild ( 'table' , { static : false } ) table ! : DatatableComponent ;
/** Gets the effective row detail template (from component or direct input) */
protected get effectiveRowDetailTemplate ( ) : TemplateRef < RowDetailContext < R > > | undefined {
get effectiveRowDetailTemplate ( ) : TemplateRef < any > | undefined {
return this . rowDetailComponent ? . template ( ) ? ? this . rowDetailTemplate ;
return this . rowDetailComponent ? . template ( ) ? ? this . rowDetailTemplate ;
}
}
/** Gets the effective row detail height */
protected get effectiveRowDetailHeight ( ) : string | number {
get effectiveRowDetailHeight ( ) : string | number {
return this . rowDetailComponent ? . rowHeight ( ) ? ? this . rowDetailHeight ;
return this . rowDetailComponent ? . rowHeight ( ) ? ? this . rowDetailHeight ;
}
}