init
This commit is contained in:
@@ -5,9 +5,11 @@ import {
|
||||
Component,
|
||||
computed,
|
||||
ContentChild,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
Input,
|
||||
Output,
|
||||
Renderer2,
|
||||
signal,
|
||||
TemplateRef,
|
||||
} from '@angular/core';
|
||||
@@ -32,6 +34,9 @@ export interface IColumn<T = any> {
|
||||
@Component({
|
||||
selector: 'app-page-data-list',
|
||||
templateUrl: './page-data-list.component.html',
|
||||
// host: {
|
||||
// class: 'inline-block w-full',
|
||||
// },
|
||||
imports: [
|
||||
CommonModule,
|
||||
TableActionRowComponent,
|
||||
@@ -46,7 +51,10 @@ export interface IColumn<T = any> {
|
||||
],
|
||||
})
|
||||
export class PageDataListComponent<I> {
|
||||
constructor() {}
|
||||
constructor(
|
||||
private host: ElementRef,
|
||||
private renderer: Renderer2,
|
||||
) {}
|
||||
|
||||
@Input() pageTitle!: string;
|
||||
@Input() addNewCtaLabel?: string;
|
||||
@@ -64,7 +72,8 @@ export class PageDataListComponent<I> {
|
||||
@Input() showDetails: boolean = false;
|
||||
@Input() showAdd: boolean = false;
|
||||
@Input() isFiltered: boolean = false;
|
||||
@Input() fullHeight: boolean = false;
|
||||
@Input() fullHeight?: boolean = false;
|
||||
@Input() height: string = '500px';
|
||||
|
||||
@ContentChild('filter', { static: true }) filter!: TemplateRef<any> | null;
|
||||
@ContentChild('caption', { static: true }) caption!: TemplateRef<any> | null;
|
||||
@@ -78,8 +87,15 @@ export class PageDataListComponent<I> {
|
||||
filterDrawerVisible = signal<boolean>(false);
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.fullHeight);
|
||||
console.log(this.height);
|
||||
|
||||
this.renderer.setStyle(
|
||||
this.host.nativeElement,
|
||||
'height',
|
||||
this.fullHeight ? '100cqmin' : this.height,
|
||||
);
|
||||
// if (this.fullHeight) {
|
||||
// this.renderer.setStyle(this.host.nativeElement, 'height', '100cqmin');
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user