Skip to content

Commit f1181a4

Browse files
authored
Merge pull request #12 from SAP-samples/refactor/P13nTable-SelectionController-remove-getKeyForItem
refactor(P13nTable): remove 'getKeyForItem' from SelectionController …
2 parents b4e6baf + dfc409c commit f1181a4

File tree

12 files changed

+12
-48
lines changed

12 files changed

+12
-48
lines changed

exercises/ex04/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ private initP13n(): void {
2626
controller: {
2727
Columns: new SelectionController({
2828
control: this,
29-
targetAggregation: "columns",
30-
getKeyForItem: (column: Column) => {
31-
return column.data("p13nKey")
32-
}
29+
targetAggregation: "columns"
3330
})
3431
}
3532
})

exercises/ex04/sample.p13n/webapp/control/P13nTable.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ export default class P13nTable extends Table {
5656
// @ts-ignore TODO: FIX constructor
5757
Columns: new SelectionController({
5858
control: this,
59-
targetAggregation: "columns",
60-
getKeyForItem: (column: Column) => {
61-
return column.data("p13nKey")
62-
}
59+
targetAggregation: "columns"
6360
})
6461
}
6562
})

exercises/ex05/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ private initP13n(): void {
3737
controller: {
3838
Columns: new SelectionController({
3939
control: this,
40-
targetAggregation: "columns",
41-
getKeyForItem: (column: Column) => {
42-
return column.data("p13nKey")
43-
}
40+
targetAggregation: "columns"
4441
}),
4542
Sorter: new SortController({
4643
control: this

exercises/ex05/sample.p13n/webapp/control/P13nTable.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ export default class P13nTable extends Table {
5656
controller: {
5757
Columns: new SelectionController({
5858
control: this,
59-
targetAggregation: "columns",
60-
getKeyForItem: (column: Column) => {
61-
return column.data("p13nKey")
62-
}
59+
targetAggregation: "columns"
6360
}),
6461
Sorter: new SortController({
6562
control: this

exercises/ex06/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ this.engine.register(this, {
1919
controller: {
2020
Columns: new SelectionController({
2121
control: this,
22-
targetAggregation: "columns",
23-
getKeyForItem: (column: Column) => {
24-
return column.data("p13nKey")
25-
}
22+
targetAggregation: "columns"
2623
}),
2724
Sorter: new SortController({
2825
control: this

exercises/ex06/sample.p13n/webapp/control/P13nTable.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ export default class P13nTable extends Table {
6363
controller: {
6464
Columns: new SelectionController({
6565
control: this,
66-
targetAggregation: "columns",
67-
getKeyForItem: (column: Column) => {
68-
return column.data("p13nKey")
69-
}
66+
targetAggregation: "columns"
7067
}),
7168
Sorter: new SortController({
7269
control: this

exercises/ex07/sample.p13n/webapp/control/P13nTable.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ export default class P13nTable extends Table {
6262
controller: {
6363
Columns: new SelectionController({
6464
control: this,
65-
targetAggregation: "columns",
66-
getKeyForItem: (column: Column) => {
67-
return column.data("p13nKey")
68-
}
65+
targetAggregation: "columns"
6966
}),
7067
Sorter: new SortController({
7168
control: this

exercises/ex08/sample.p13n/webapp/control/P13nTable.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ export default class P13nTable extends Table {
6262
controller: {
6363
Columns: new SelectionController({
6464
control: this,
65-
targetAggregation: "columns",
66-
getKeyForItem: (column: Column) => {
67-
return column.data("p13nKey")
68-
}
65+
targetAggregation: "columns"
6966
}),
7067
Sorter: new SortController({
7168
control: this

exercises/ex09/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ export default class MountainsController extends Controller {
116116
controller: {
117117
Items: new SelectionController({
118118
control: gridList,
119-
targetAggregation: "items",
120-
getKeyForItem: (gridListItem: GridListItem) => {
121-
return gridListItem.getSelected()
122-
}
119+
targetAggregation: "items"
123120
})
124121
}
125122
})

exercises/ex09/sample.p13n/webapp/control/P13nTable.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ export default class P13nTable extends Table {
6363
controller: {
6464
Columns: new SelectionController({
6565
control: this,
66-
targetAggregation: "columns",
67-
getKeyForItem: (column: Column) => {
68-
return column.data("p13nKey")
69-
}
66+
targetAggregation: "columns"
7067
}),
7168
Sorter: new SortController({
7269
control: this

0 commit comments

Comments
 (0)