Skip to content

Commit deb2b83

Browse files
authored
Update selected code flow when data flow paths change (#2288)
1 parent 0115259 commit deb2b83

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

extensions/ql-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [UNRELEASED]
44

5+
- Fix bug that was causing code flows to not get updated when switching between results. [#2288](https://github.com/github/vscode-codeql/pull/2288)
56
- Restart the CodeQL language server whenever the _CodeQL: Restart Query Server_ command is invoked. This avoids bugs where the CLI version changes to support new language features, but the language server is not updated. [#2238](https://github.com/github/vscode-codeql/pull/2238)
67

78
## 1.8.1 - 23 March 2023

extensions/ql-vscode/src/view/data-flow-paths/DataFlowPaths.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ export const DataFlowPaths = ({
4141

4242
const { codeFlows, ruleDescription, message, severity } = dataFlowPaths;
4343

44+
React.useEffect(() => {
45+
// Make sure to update the selected code flow if the data flow paths change
46+
setSelectedCodeFlow(dataFlowPaths.codeFlows[0]);
47+
}, [dataFlowPaths]);
48+
4449
return (
4550
<>
4651
<VerticalSpace size={2} />

0 commit comments

Comments
 (0)