Skip to content

Commit

Permalink
Merge pull request #37681 from Expensify/rodrigo-fix-multilevel-tag-list
Browse files Browse the repository at this point in the history
Always sorting tags by orderWeight
  • Loading branch information
roryabraham authored Mar 4, 2024
2 parents 5c7124f + 49582a5 commit 4d4eaad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libs/PolicyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ function getTagLists(policyTagList: OnyxEntry<PolicyTagList>): Array<PolicyTagLi
return [];
}

return Object.values(policyTagList).filter((policyTagListValue) => policyTagListValue !== null);
return Object.values(policyTagList)
.filter((policyTagListValue) => policyTagListValue !== null)
.sort((tagA, tagB) => tagA.orderWeight - tagB.orderWeight);
}

/**
Expand Down

0 comments on commit 4d4eaad

Please sign in to comment.