Skip to content

Commit 0552028

Browse files
Collections: sort by name by default (#4806) (#4807)
* 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 <mhradil@redhat.com>
1 parent 89e936a commit 0552028

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGES/850.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Collections: sort by name by default

src/containers/namespace-detail/namespace-detail.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ export class NamespaceDetail extends React.Component<RouteProps, IState> {
113113
params.repository_name = props.routeParams.repo;
114114
}
115115

116+
if (!params['sort']) {
117+
params['sort'] = 'name';
118+
}
119+
116120
this.state = {
117121
alerts: [],
118122
canSign: false,

src/containers/search/search.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ class Search extends React.Component<RouteProps, IState> {
8888
);
8989
}
9090

91+
if (!params['sort']) {
92+
params['sort'] = 'name';
93+
}
94+
9195
this.state = {
9296
collections: [],
9397
params: params,

0 commit comments

Comments
 (0)