Skip to content

Commit

Permalink
fix: update kbar search on collections change
Browse files Browse the repository at this point in the history
  • Loading branch information
notmedia committed Aug 21, 2022
1 parent b26c913 commit 7343f6e
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/app/pages/shortcuts/hooks/use-grpc-method-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function useGrpcMethodActions() {
)}
</Container>
),
perform: () =>
perform: () => {
createGrpcTab({
type: CollectionType.GRPC,
title: method.name,
Expand All @@ -47,21 +47,25 @@ export function useGrpcMethodActions() {
methodId: method.id,
methodType: method.type,
},
}),
});
},
});
});
});
return acc;
}, [] as Action[]);

useRegisterActions([
{
id: 'grpc',
section: 'Grpc',
name: 'New gRPC Tab',
icon: <FontAwesomeIcon icon={faSquarePlus} />,
shortcut: ['$mod+T'],
},
...methods,
]);
useRegisterActions(
[
{
id: 'grpc',
section: 'Grpc',
name: 'New gRPC Tab',
icon: <FontAwesomeIcon icon={faSquarePlus} />,
shortcut: ['$mod+T'],
},
...methods,
],
[methods]
);
}

0 comments on commit 7343f6e

Please sign in to comment.