We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 240dd51 commit 160642eCopy full SHA for 160642e
1 file changed
extensions/ql-vscode/src/view/results/AlertTable.tsx
@@ -45,7 +45,7 @@ export function AlertTable(props: AlertTableProps) {
45
* first item, open all the rest as well. This mimics vscode's file
46
* explorer tree view behavior.
47
*/
48
- const toggle = (e: React.MouseEvent, keys: Keys.ResultKey[]) => {
+ const toggle = useCallback((e: React.MouseEvent, keys: Keys.ResultKey[]) => {
49
const keyStrings = keys.map(Keys.keyToString);
50
setExpanded((previousExpanded) => {
51
const expanded = new Set(previousExpanded);
@@ -63,7 +63,7 @@ export function AlertTable(props: AlertTableProps) {
63
});
64
e.stopPropagation();
65
e.preventDefault();
66
- };
+ }, []);
67
68
const getNewSelection = (
69
key: Keys.ResultKey | undefined,
0 commit comments