File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,16 @@ updates. This can be based on _anything_: websocket connections, user interactio
135
135
time-based intervals, etc. Most commonly, updates will be triggered by user interactions like
136
136
sorting and pagination.
137
137
138
+ ##### ` fixedLayout `
139
+ Native tables calculate column widths from the content within each cell. Because of this, the CDK
140
+ table measures the dimensions of sticky elements when its underlying data changes to check if their
141
+ widths have also changed. Enabling ` fixedLayout ` will enforce uniform column widths so the table
142
+ can reliably cache their widths. This can reduce rendering latency for large native tables.
143
+
144
+ ``` html
145
+ <table cdk-table [dataSource] =" dataSource" fixedLayout >
146
+ ```
147
+
138
148
##### ` trackBy `
139
149
140
150
To improve performance, a ` trackBy ` function can be provided to the table similar to Angular’s
@@ -145,6 +155,16 @@ table how to uniquely identify rows to track how the data changes with each upda
145
155
<table cdk-table [dataSource] =" dataSource" [trackBy] =" myTrackById" >
146
156
```
147
157
158
+ ##### ` recycleRows `
159
+ By default, ` CdkTable ` creates and destroys an internal Angular view for each row. This allows rows
160
+ to participate in animations and to toggle between different row templates with ` cdkRowDefWhen ` . If
161
+ you don't need these features, you can instruct the table to cache and recycle rows by specifying
162
+ ` recycleRows ` .
163
+
164
+ ``` html
165
+ <table cdk-table [dataSource] =" dataSource" recycleRows >
166
+ ```
167
+
148
168
### Alternate HTML to using native table
149
169
150
170
The CDK table does not require that you use a native HTML table. If you want to have full control
You can’t perform that action at this time.
0 commit comments