Skip to content

Commit db1c83d

Browse files
committed
feat(cdk-experimental/table-scroll-container): Create directive and demo
Adds the CdkTableScrollContainer and some hooks in CdkTable for it. For Webkit/Blink browsers, this sizes the scroll bars in coordinating with sticky rows/columns in the table to create the user experience that a lot of commenters in #5885 seemed to want but without the accessibility problems of other approaches.
1 parent b8cdef4 commit db1c83d

23 files changed

+1113
-31
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
/src/cdk-experimental/menu/** @jelbourn @andy9775
134134
/src/cdk-experimental/popover-edit/** @kseamon @andrewseguin
135135
/src/cdk-experimental/scrolling/** @mmalerba
136+
/src/cdk-experimental/table-scroll-container/** @kseamon @andrewseguin
136137
/src/cdk-experimental/listbox/** @nielsr98 @jelbourn
137138
/src/cdk-experimental/selection/** @yifange @jelbourn
138139

@@ -215,6 +216,7 @@
215216
/src/dev-app/snack-bar/** @jelbourn @crisbeto
216217
/src/dev-app/stepper/** @mmalerba
217218
/src/dev-app/table/** @andrewseguin
219+
/src/dev-app/table-scroll-container/** @kseamon @andrewseguin
218220
/src/dev-app/tabs/** @andrewseguin
219221
/src/dev-app/toolbar/** @devversion
220222
/src/dev-app/tooltip/** @andrewseguin

src/cdk-experimental/config.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CDK_EXPERIMENTAL_ENTRYPOINTS = [
88
"popover-edit",
99
"scrolling",
1010
"selection",
11+
"table-scroll-container",
1112
]
1213

1314
# List of all entry-point targets of the Angular cdk-experimental package.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
load(
2+
"//tools:defaults.bzl",
3+
"ng_module",
4+
"ng_test_library",
5+
"ng_web_test_suite",
6+
)
7+
8+
package(default_visibility = ["//visibility:public"])
9+
10+
ng_module(
11+
name = "table-scroll-container",
12+
srcs = glob(
13+
["**/*.ts"],
14+
exclude = ["**/*.spec.ts"],
15+
),
16+
module_name = "@angular/cdk-experimental/table-scroll-container",
17+
deps = [
18+
"//src/cdk/bidi",
19+
"//src/cdk/platform",
20+
"//src/cdk/table",
21+
"@npm//@angular/common",
22+
"@npm//@angular/core",
23+
"@npm//rxjs",
24+
],
25+
)
26+
27+
ng_test_library(
28+
name = "unit_test_sources",
29+
srcs = glob(
30+
["**/*.spec.ts"],
31+
exclude = ["**/*.e2e.spec.ts"],
32+
),
33+
deps = [
34+
":table-scroll-container",
35+
"//src/cdk/collections",
36+
"//src/cdk/platform",
37+
"//src/cdk/table",
38+
"@npm//rxjs",
39+
],
40+
)
41+
42+
ng_web_test_suite(
43+
name = "unit_tests",
44+
deps = [":unit_test_sources"],
45+
)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export * from './public-api';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export * from './table-scroll-container';
10+
export * from './table-scroll-container-module';
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
11+
import {CdkTableScrollContainer} from './table-scroll-container';
12+
13+
@NgModule({
14+
declarations: [CdkTableScrollContainer],
15+
exports: [CdkTableScrollContainer],
16+
})
17+
export class CdkTableScrollContainerModule {}

0 commit comments

Comments
 (0)