@@ -6,7 +6,6 @@ import { CodeDialogComponent } from '../../shared/dialog/code-dialog.component';
6
6
@Component ( {
7
7
selector : 'sample-first' ,
8
8
templateUrl : './sample-first.component.html' ,
9
- styleUrls : [ './sample-first.component.css' ] ,
10
9
changeDetection : ChangeDetectionStrategy . OnPush
11
10
} )
12
11
export class SampleFirstComponent implements OnInit {
@@ -28,10 +27,14 @@ export class SampleFirstComponent implements OnInit {
28
27
this . dialog . open ( CodeDialogComponent , {
29
28
data : {
30
29
title : 'Overview simple table (app.component.html)' ,
30
+ description : 'If you want enabled virtual scroll, you need use auto-height or height attribute.' ,
31
31
code :
32
32
`<!-- simple - is Array any objects -->\n` +
33
- `<ngx-table-builder [source]="simple"></ngx-table-builder>\n\n` +
34
- `<!-- also you can set height, width for table -->\n` +
33
+ `<ngx-table-builder\n` +
34
+ ` [source]="simple"\n` +
35
+ ` [auto-height]="true"\n` +
36
+ `></ngx-table-builder>\n\n\n` +
37
+ `<!-- also you can set height, width for cell in table -->\n` +
35
38
`<ngx-table-builder\n` +
36
39
` [source]="simple"\n` +
37
40
` [width]="width"\n` +
@@ -40,7 +43,7 @@ export class SampleFirstComponent implements OnInit {
40
43
` [column-width]="columnWidth"\n` +
41
44
`></ngx-table-builder>\n`
42
45
} ,
43
- height : '340px ' ,
46
+ height : '450px ' ,
44
47
width : '600px'
45
48
} ) ;
46
49
}
@@ -84,9 +87,9 @@ export class SampleFirstComponent implements OnInit {
84
87
85
88
const baseRow : TableRow = {
86
89
id : idx ,
87
- name : 'Hello - ' + ( ( Math . random ( ) + 1 ) * 100 ) . toFixed ( 0 ) + '__' + idx ,
88
- description : 'World - ' + ( ( Math . random ( ) + 1 ) * 100 ) . toFixed ( 0 ) + '__' + idx ,
89
- _id : '5cdae5b2ba0a57f709b72142' + '__' + idx ,
90
+ name : 'Random - ' + ( ( Math . random ( ) + 1 ) * 100 ) . toFixed ( 0 ) + '__' + idx ,
91
+ description : 'Random - ' + ( ( Math . random ( ) + 1 ) * 100 ) . toFixed ( 0 ) + '__' + idx ,
92
+ guid : '5cdae5b2ba0a57f709b72142' + '__' + idx ,
90
93
[ 'About Big Text And More Powerful Label Fugiat tempor sunt nostrud' ] : `
91
94
Fugiat tempor sunt nostrud ad fugiat. Laboris velit duis incididunt culpa consectetur veniam.
92
95
Fugiat tempor sunt nostrud ad fugiat. Laboris velit duis incididunt culpa consectetur veniam.
0 commit comments