File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import {BehaviorSubject} from 'rxjs/BehaviorSubject';
7
7
import { customMatchers } from '../testing/jasmine-matchers' ;
8
8
import { CdkDataTableModule } from './index' ;
9
9
10
- describe ( 'CdkTable' , ( ) => {
10
+ fdescribe ( 'CdkTable' , ( ) => {
11
11
let fixture : ComponentFixture < SimpleCdkTableApp > ;
12
12
13
13
let component : SimpleCdkTableApp ;
@@ -134,7 +134,6 @@ describe('CdkTable', () => {
134
134
it ( 'should match the right table content with dynamic data' , ( ) => {
135
135
const initialDataLength = dataSource . data . length ;
136
136
expect ( dataSource . data . length ) . toBe ( 3 ) ;
137
- const headerContent = [ 'Column A' , 'Column B' , 'Column C' ] ;
138
137
139
138
let data = dataSource . data ;
140
139
expect ( tableElement ) . toMatchTableContent ( [
@@ -183,7 +182,6 @@ describe('CdkTable', () => {
183
182
[ data [ 1 ] . c , data [ 1 ] . b ] ,
184
183
[ data [ 2 ] . c , data [ 2 ] . b ] ,
185
184
] ) ;
186
- expect ( tableElement ) . toMatchTableContent ( changedTableContent ) ;
187
185
} ) ;
188
186
} ) ;
189
187
Original file line number Diff line number Diff line change @@ -143,6 +143,10 @@ export class CdkTable<T> implements CollectionViewer {
143
143
this . _columnsChange . subscribe ( ( ) => {
144
144
this . _headerRowPlaceholder . viewContainer . clear ( ) ;
145
145
this . renderHeaderRow ( ) ;
146
+
147
+ // Reset the data to an empty array so that renderRowChanges will re-render all new rows.
148
+ this . _rowPlaceholder . viewContainer . clear ( ) ;
149
+ this . _dataDiffer . diff ( [ ] ) ;
146
150
} ) ;
147
151
148
152
// TODO(andrewseguin): If the data source is not
You can’t perform that action at this time.
0 commit comments