Skip to content

Commit 6a6d990

Browse files
committed
refactor(cdk-experimental/table-scroll-container): switch to standalone
Reworks `cdk-experimental/table-scroll-container` to support standalone.
1 parent 592d00b commit 6a6d990

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/cdk-experimental/table-scroll-container/table-scroll-container-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {NgModule} from '@angular/core';
1111
import {CdkTableScrollContainer} from './table-scroll-container';
1212

1313
@NgModule({
14-
declarations: [CdkTableScrollContainer],
14+
imports: [CdkTableScrollContainer],
1515
exports: [CdkTableScrollContainer],
1616
})
1717
export class CdkTableScrollContainerModule {}

src/cdk-experimental/table-scroll-container/table-scroll-container.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ describe('CdkTableScrollContainer', () => {
2323
declarations: any[] = [],
2424
): ComponentFixture<T> {
2525
TestBed.configureTestingModule({
26-
imports: [CdkTableModule, CdkTableScrollContainerModule],
27-
declarations: [componentType, ...declarations],
26+
imports: [CdkTableModule, CdkTableScrollContainerModule, componentType, ...declarations],
2827
}).compileComponents();
2928

3029
return TestBed.createComponent<T>(componentType);
@@ -275,6 +274,8 @@ class FakeDataSource extends DataSource<TestData> {
275274
</table>
276275
</div>
277276
`,
277+
standalone: true,
278+
imports: [CdkTableModule, CdkTableScrollContainerModule],
278279
styles: [
279280
`
280281
.cdk-header-cell, .cdk-cell, .cdk-footer-cell {

src/cdk-experimental/table-scroll-container/table-scroll-container.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ let nextId = 0;
3636
'class': 'cdk-table-scroll-container',
3737
},
3838
providers: [{provide: STICKY_POSITIONING_LISTENER, useExisting: CdkTableScrollContainer}],
39+
standalone: true,
3940
})
4041
export class CdkTableScrollContainer implements StickyPositioningListener, OnDestroy, OnInit {
4142
private readonly _uniqueClassName: string;

0 commit comments

Comments
 (0)