Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Commit e75443b

Browse files
author
Sgroi
committed
tweaks to fit eslint
1 parent 4696caf commit e75443b

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/components/DataTableController.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export default class DataTableController {
149149
/**
150150
* Sorts the values of the grid for client side sorting.
151151
*/
152-
onSorted(){
152+
onSorted() {
153153
if (!this.rows) {
154154
return;
155155
}
@@ -175,10 +175,10 @@ export default class DataTableController {
175175
c.sortPriority = i + 1;
176176
return c;
177177
});
178-
178+
179179
if (sorts.length) {
180180
if (this.onSort) {
181-
this.onSort({sorts: sorts});
181+
this.onSort({ sorts: sorts });
182182
}
183183

184184
if (this.options.onSort) {
@@ -187,8 +187,8 @@ export default class DataTableController {
187187

188188

189189
const clientSorts = [];
190-
191-
for (let i = 0, len = sorts.length; i < len; i++) {
190+
191+
for (let i = 0, len = sorts.length; i < len; i += 1) {
192192
const c = sorts[i];
193193
if (c.comparator !== false) {
194194
const dir = c.sort === 'asc' ? '' : '-';

src/components/body/BodyController.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ export default class BodyController {
7575
* @description Constructs the rows for the page, assuming we're using internal paging.
7676
*/
7777
buildInternalPage() {
78-
var i;
78+
let i;
7979

8080
this.tempRows.splice(0, this.tempRows.length);
8181

82-
for (i = 0; i < this.options.paging.size; ++i) {
83-
this.tempRows[i] = this.rows[this.options.paging.offset * this.options.paging.size + i];
82+
for (i = 0; i < this.options.paging.size; i += 1) {
83+
this.tempRows[i] = this.rows[(this.options.paging.offset * this.options.paging.size) + i];
8484
}
8585
}
8686

@@ -91,10 +91,10 @@ export default class BodyController {
9191
this.watchListeners.splice(i, 1);
9292
}
9393

94-
if (this.options &&
95-
(this.options.scrollbarV ||
96-
(!this.options.scrollbarV &&
97-
this.options.paging &&
94+
if (this.options &&
95+
(this.options.scrollbarV ||
96+
(!this.options.scrollbarV &&
97+
this.options.paging &&
9898
this.options.paging.size))) {
9999
let sized = false;
100100

@@ -112,15 +112,14 @@ export default class BodyController {
112112

113113
this.watchListeners.push(this.$scope.$watch('body.options.paging.offset', (newVal) => {
114114
if (this.options.paging.size) {
115-
116115
if (!this.options.paging.externalPaging) {
117116
this.buildInternalPage();
118117
}
119118

120119
if (this.onPage) {
121120
this.onPage({
122121
offset: newVal,
123-
size: this.options.paging.size
122+
size: this.options.paging.size,
124123
});
125124
}
126125
}

0 commit comments

Comments
 (0)