Skip to content

Commit

Permalink
BUGFIX: Search raises exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed May 7, 2020
1 parent 5f5c8f2 commit fd6245a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Resources/Private/JavaScript/components/RedirectList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class RedirectList extends React.Component<RedirectListProps, RedirectLis
*
* @param searchValue
*/
private handleUpdateSearch(searchValue: string): void {
private handleUpdateSearch = (searchValue: string): void => {
const {
redirects,
filterStatusCode,
Expand Down Expand Up @@ -126,12 +126,12 @@ export class RedirectList extends React.Component<RedirectListProps, RedirectLis
filterType: validFilterTypeSelection,
currentPage: Math.min(currentPage, RedirectList.getMaxPage(filteredRedirects)),
});
}
};

/**
* Refreshes the list
*/
private refresh(): void {
private refresh = (): void => {
const { redirects } = this.state;
this.setState(
{
Expand Down Expand Up @@ -235,7 +235,7 @@ export class RedirectList extends React.Component<RedirectListProps, RedirectLis
* @param propertyName
* @param sortDirection
*/
private sortRedirects(redirects: Redirect[], propertyName: string, sortDirection: SortDirection): Redirect[] {
private sortRedirects = (redirects: Redirect[], propertyName: string, sortDirection: SortDirection): Redirect[] => {
const sortedRedirects = redirects.sort((a, b) => {
let x = a[propertyName];
if (typeof x === 'string') {
Expand All @@ -257,7 +257,7 @@ export class RedirectList extends React.Component<RedirectListProps, RedirectLis
}

return sortedRedirects;
}
};

/**
* Asks for confirmation and then sends the deletion request to the backend.
Expand Down
Loading

0 comments on commit fd6245a

Please sign in to comment.