Skip to content

Commit 00211f9

Browse files
committed
Renames colummn to column
This is a non-breaking change for when colummn is present, it will be copied to column The only thing we lose here is making column a required binding for the table component, kinda unavoidable though
1 parent b828a11 commit 00211f9

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

src/table/tableview/examples/table-view-basic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
config="config"
4343
empty-state-config="emptyStateConfig"
4444
dt-options="dtOptions"
45-
colummns="colummns"
45+
columns="columns"
4646
items="items"
4747
action-buttons="actionButtons"
4848
menu-actions="menuActions">
@@ -77,7 +77,7 @@
7777
order: [[2, "asc"]],
7878
};
7979
80-
$scope.colummns = [
80+
$scope.columns = [
8181
{ header: "Name", itemField: "name" },
8282
{ header: "Address", itemField: "address"},
8383
{ header: "City", itemField: "city" },

src/table/tableview/examples/table-view-with-toolbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<pf-table-view config="tableConfig"
4444
empty-state-config="emptyStateConfig"
4545
dt-options="dtOptions"
46-
colummns="colummns"
46+
columns="columns"
4747
items="items"
4848
action-buttons="tableActionButtons"
4949
menu-actions="tableMenuActions">
@@ -82,7 +82,7 @@
8282
function ($scope, pfViewUtils, $filter) {
8383
$scope.actionsText = "";
8484
85-
$scope.colummns = [
85+
$scope.columns = [
8686
{ header: "Name", itemField: "name" },
8787
{ header: "Age", itemField: "age"},
8888
{ header: "Address", itemField: "address" },

src/table/tableview/table-view.component.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ angular.module('patternfly.table').component('pfTableView', {
22
bindings: {
33
config: '<?',
44
dtOptions: '<?',
5-
colummns: '<',
5+
colummns: '<?',
6+
columns: '<?',
67
items: '<',
78
actionButtons: '<?',
89
menuActions: '<?',
@@ -41,6 +42,9 @@ angular.module('patternfly.table').component('pfTableView', {
4142
$log.debug("$onInit");
4243
}
4344

45+
if (angular.isDefined(ctrl.colummns)) {
46+
ctrl.columns = ctrl.colummns;
47+
}
4448
if (angular.isUndefined(ctrl.dtOptions)) {
4549
ctrl.dtOptions = {};
4650
}
@@ -79,7 +83,7 @@ angular.module('patternfly.table').component('pfTableView', {
7983
// lodash-amd a-pf is using
8084

8185
if (!validSelectionMatchProp()) {
82-
angular.forEach(ctrl.colummns, function (col) {
86+
angular.forEach(ctrl.columns, function (col) {
8387
if (props.length === 0) {
8488
props = col.itemField;
8589
} else {
@@ -88,7 +92,7 @@ angular.module('patternfly.table').component('pfTableView', {
8892
});
8993
throw new Error("pfTableView - " +
9094
"config.selectionMatchProp '" + ctrl.config.selectionMatchProp +
91-
"' does not match any property in 'config.colummns'! Please set config.selectionMatchProp " +
95+
"' does not match any property in 'config.columns'! Please set config.selectionMatchProp " +
9296
"to one of these properties: " + props);
9397
}
9498

@@ -342,7 +346,7 @@ angular.module('patternfly.table').component('pfTableView', {
342346

343347
ctrl.isColItemFld = function (key) {
344348
var retVal = false;
345-
var tableCol = $filter('filter')(ctrl.colummns, {itemField: key});
349+
var tableCol = $filter('filter')(ctrl.columns, {itemField: key});
346350

347351
if (tableCol && tableCol.length === 1) {
348352
retVal = true;

src/table/tableview/table-view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<thead>
66
<tr role="row">
77
<th class="table-view-pf-select"><input type="checkbox" value="$ctrl.selectAll" ng-model="$ctrl.selectAll" ng-change="$ctrl.toggleAll()"/></th>
8-
<th ng-repeat="col in $ctrl.colummns">{{col.header}}</th>
8+
<th ng-repeat="col in $ctrl.columns">{{col.header}}</th>
99
<th ng-if="$ctrl.areActions()" colspan="{{$ctrl.calcActionsColspan()}}">Actions</th>
1010
</tr>
1111
</thead>

src/toolbars/examples/toolbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
</div>
120120
<div class="col-md-12" ng-show="viewType == 'tableView'">
121121
<pf-table-view config="tableConfig"
122-
colummns="colummns"
122+
columns="columns"
123123
items="items"
124124
empty-state-config="emptyStateConfig">
125125
</pf-table-view>
@@ -156,7 +156,7 @@
156156
function ($scope, pfViewUtils, $filter) {
157157
$scope.filtersText = '';
158158
159-
$scope.colummns = [
159+
$scope.columns = [
160160
{ header: "Name", itemField: "name" },
161161
{ header: "Age", itemField: "age"},
162162
{ header: "Address", itemField: "address" },

0 commit comments

Comments
 (0)