Skip to content

Commit 01624ab

Browse files
authored
Use arrow functions in perPageOptions computed property
1 parent 568257e commit 01624ab

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/DataTable.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,17 +257,13 @@
257257
var options = (Array.isArray(this.perPage) && this.perPage) || [10, 20, 30, 40, 50];
258258
259259
// Force numbers
260-
options = options.map(function (v) {
261-
return parseInt(v);
262-
});
260+
options = options.map( v => parseInt(v));
263261
264262
// Set current page to first value
265263
this.currentPerPage = options[0];
266264
267265
// Sort options
268-
options.sort(function(a, b) {
269-
return a - b;
270-
});
266+
options.sort((a,b) => a - b);
271267
272268
// And add "All"
273269
options.push(-1);

0 commit comments

Comments
 (0)