Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
felixw committed Oct 6, 2023
1 parent d70975b commit b642615
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/components/src/components/data-grid/data-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,14 @@ export class DataGrid {
) {
if (sortDirection === 'ascending') {
this.rows.sort((a, b) => {
var aDateParts = a[columnIndex].split(splitRegex);
var aDateObject = new Date(
const aDateParts = a[columnIndex].split(splitRegex);
const aDateObject = new Date(
+aDateParts[2],
aDateParts[1] - 1,
+aDateParts[0]
);
var bDateParts = b[columnIndex].split(splitRegex);
var bDateObject = new Date(
const bDateParts = b[columnIndex].split(splitRegex);
const bDateObject = new Date(
+bDateParts[2],
bDateParts[1] - 1,
+bDateParts[0]
Expand All @@ -446,14 +446,14 @@ export class DataGrid {
});
} else if (sortDirection === 'descending') {
this.rows.sort((a, b) => {
var aDateParts = a[columnIndex].split(splitRegex);
var aDateObject = new Date(
const aDateParts = a[columnIndex].split(splitRegex);
const aDateObject = new Date(
+aDateParts[2],
aDateParts[1] - 1,
+aDateParts[0]
);
var bDateParts = b[columnIndex].split(splitRegex);
var bDateObject = new Date(
const bDateParts = b[columnIndex].split(splitRegex);
const bDateObject = new Date(
+bDateParts[2],
bDateParts[1] - 1,
+bDateParts[0]
Expand Down

0 comments on commit b642615

Please sign in to comment.