You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/libs/SidebarUtils.ts
+12-10
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,18 @@ function getOrderedReportIDs(
156
156
}
157
157
}
158
158
159
+
// There are a few properties that need to be calculated for the report which are used when sorting reports.
160
+
reportsToDisplay.forEach((report)=>{
161
+
// Normally, the spread operator would be used here to clone the report and prevent the need to reassign the params.
162
+
// However, this code needs to be very performant to handle thousands of reports, so in the interest of speed, we're just going to disable this lint rule and add
163
+
// the reportDisplayName property to the report object directly.
// The LHN is split into four distinct groups, and each group is sorted a little differently. The groups will ALWAYS be in this order:
160
172
// 1. Pinned/GBR - Always sorted by reportDisplayName
161
173
// 2. Drafts - Always sorted by reportDisplayName
@@ -169,17 +181,7 @@ function getOrderedReportIDs(
169
181
constdraftReports: Report[]=[];
170
182
constnonArchivedReports: Report[]=[];
171
183
constarchivedReports: Report[]=[];
172
-
173
184
reportsToDisplay.forEach((report)=>{
174
-
// Normally, the spread operator would be used here to clone the report and prevent the need to reassign the params.
175
-
// However, this code needs to be very performant to handle thousands of reports, so in the interest of speed, we're just going to disable this lint rule and add
176
-
// the reportDisplayName property to the report object directly.
0 commit comments