console: sort ET in alphabetical ordering

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11021
GitOrigin-RevId: 83ae9bc6328c4d38c647b0ddee176ed1ae245d19
This commit is contained in:
Varun Choudhary 2024-09-10 10:20:19 +05:30 committed by hasura-bot
parent da544547ff
commit 397ce4dca2

View File

@ -74,7 +74,9 @@ const LeftSidebar: React.FC<Props> = props => {
> >
{service === 'data' ? ( {service === 'data' ? (
<TreeView <TreeView
items={items as EventTrigger[]} items={[...(items as EventTrigger[])].sort((a, b) =>
a.name.toLowerCase().localeCompare(b.name.toLowerCase())
)}
icon={getSidebarIcon()} icon={getSidebarIcon()}
service="triggers" service="triggers"
currentItem={currentTrigger as EventTrigger} currentItem={currentTrigger as EventTrigger}