Skip to content

Commit

Permalink
feat: package list page - sorting (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 authored Dec 10, 2024
1 parent 24295ad commit 4845b90
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/src/app/pages/package-list/package-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface IPackageSearchContext {
| "path"
| "qualifiers"
| "vulnerabilities",
never,
"name" | "namespace" | "version",
"" | "type" | "arch",
string
>;
Expand Down Expand Up @@ -70,7 +70,7 @@ export const PackageSearchProvider: React.FunctionComponent<
},
isPaginationEnabled: true,
isSortEnabled: true,
sortableColumns: [],
sortableColumns: ["name", "namespace", "version"],
isFilterEnabled: true,
filterCategories: [
{
Expand Down Expand Up @@ -115,7 +115,11 @@ export const PackageSearchProvider: React.FunctionComponent<
} = useFetchPackages(
getHubRequestParams({
...tableControlState,
hubSortFieldKeys: {},
hubSortFieldKeys: {
name: "name",
namespace: "namespace",
version: "version",
},
})
);

Expand Down

0 comments on commit 4845b90

Please sign in to comment.