Skip to content

Commit

Permalink
fix(issue-details): Fix all events default sort (#80492)
Browse files Browse the repository at this point in the history
this pr fixes the all events default sort (again). there are still some
cases where the default sort is not being applied, this should fix it.
  • Loading branch information
roggenkemper authored Nov 8, 2024
1 parent d6f1c84 commit 21c3709
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions static/app/views/issueDetails/streamline/eventList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export function EventList({group}: EventListProps) {
group,
queryProps: {
fields,
orderby: ['-timestamp'],
widths: fields.map(field => {
switch (field) {
case 'id':
Expand All @@ -69,10 +68,12 @@ export function EventList({group}: EventListProps) {
},
});

if (location.query.sort) {
eventView.sorts = decodeSorts(location.query.sort).filter(sort =>
fields.includes(sort.field)
);
eventView.sorts = decodeSorts(location.query.sort).filter(sort =>
fields.includes(sort.field)
);

if (!eventView.sorts.length) {
eventView.sorts = [{field: 'timestamp', kind: 'desc'}];
}

const grayText = css`
Expand Down

0 comments on commit 21c3709

Please sign in to comment.