Skip to content

Commit

Permalink
Collections: sort by name by default (#4806) (#4807)
Browse files Browse the repository at this point in the history
* Collections: sort by name by default

Issue: AAH-850

* namespace-detail: sort collections by name by defaul

(cherry picked from commit cadebe1)

Co-authored-by: Martin Hradil <[email protected]>
  • Loading branch information
patchback[bot] and himdel authored Jan 19, 2024
1 parent 89e936a commit 0552028
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/850.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Collections: sort by name by default
4 changes: 4 additions & 0 deletions src/containers/namespace-detail/namespace-detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ export class NamespaceDetail extends React.Component<RouteProps, IState> {
params.repository_name = props.routeParams.repo;
}

if (!params['sort']) {
params['sort'] = 'name';
}

this.state = {
alerts: [],
canSign: false,
Expand Down
4 changes: 4 additions & 0 deletions src/containers/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ class Search extends React.Component<RouteProps, IState> {
);
}

if (!params['sort']) {
params['sort'] = 'name';
}

this.state = {
collections: [],
params: params,
Expand Down

0 comments on commit 0552028

Please sign in to comment.