fix(requestlist): use default value of sort direction only if valid (#1174)
The Sort Direction was loaded with values from the localStorage, but `undefined` was assigned if no previous Sort Direction existed, causing the client to send undefined as a string for the Sort Direction. fix #1147
This commit is contained in:
@@ -87,8 +87,10 @@ const RequestList = () => {
|
||||
|
||||
setCurrentFilter(filterSettings.currentFilter);
|
||||
setCurrentSort(filterSettings.currentSort);
|
||||
setCurrentSortDirection(filterSettings.currentSortDirection);
|
||||
setCurrentPageSize(filterSettings.currentPageSize);
|
||||
if (['asc', 'desc'].includes(filterSettings.currentSortDirection)) {
|
||||
setCurrentSortDirection(filterSettings.currentSortDirection);
|
||||
}
|
||||
}
|
||||
|
||||
// If filter value is provided in query, use that instead
|
||||
|
||||
Reference in New Issue
Block a user