Skip to content

Commit d38eda7

Browse files
committed
added resetsortorder helper function
1 parent fe9d282 commit d38eda7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

forms-flow-service/src/helpers/helperServices.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ class HelperServices {
8484
exactRouteMatches.some((route) => location == route) ||
8585
partOfRouteMatches.some((route) => location.includes(route))
8686
);
87+
}
88+
89+
public static getResetSortOrders(options){
90+
return options.reduce((acc, option) => {
91+
acc[option.value] = {sortOrder:"asc"} // Reset all to ascending
92+
return acc;
93+
}, {});
8794
}
8895
}
8996

0 commit comments

Comments
 (0)