File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
extensions/ql-vscode/src/view/results Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -179,12 +179,13 @@ export function AlertTable(props: AlertTableProps) {
179179 const { numTruncatedResults, sourceLocationPrefix } =
180180 resultSet . interpretation ;
181181
182- const updateSelectionCallback = (
183- resultKey : Keys . PathNode | Keys . Result | undefined ,
184- ) => {
185- setSelectedItem ( resultKey ) ;
186- sendTelemetry ( "local-results-alert-table-path-selected" ) ;
187- } ;
182+ const updateSelectionCallback = useCallback (
183+ ( resultKey : Keys . PathNode | Keys . Result | undefined ) => {
184+ setSelectedItem ( resultKey ) ;
185+ sendTelemetry ( "local-results-alert-table-path-selected" ) ;
186+ } ,
187+ [ ] ,
188+ ) ;
188189
189190 if ( ! resultSet . interpretation . data . runs ?. [ 0 ] ?. results ?. length ) {
190191 return < AlertTableNoResults { ...props } /> ;
You can’t perform that action at this time.
0 commit comments