Skip to content

Commit a50bef8

Browse files
fix(webvitals): fix sorting by score not working (#68832)
fix page overview samples table sorting by score not working
1 parent 96e8ee9 commit a50bef8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

static/app/views/performance/browser/webVitals/pageSamplePerformanceTable.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ export function PageSamplePerformanceTable({transaction, search, limit = 9}: Pro
159159

160160
function renderHeadCell(col: Column | InteractionsColumn) {
161161
function generateSortLink() {
162-
const key = col.key === 'inpScore' ? 'measurements.score.total' : col.key;
162+
const key = ['totalScore', 'inpScore'].includes(col.key)
163+
? 'measurements.score.total'
164+
: col.key;
163165
let newSortDirection: Sort['kind'] = 'desc';
164166
if (sort?.field === key) {
165167
if (sort.kind === 'desc') {

0 commit comments

Comments
 (0)