Update selected code flow when data flow paths change (#2288)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## [UNRELEASED]
|
||||
|
||||
- Fix bug that was causing code flows to not get updated when switching between results. [#2288](https://github.com/github/vscode-codeql/pull/2288)
|
||||
- 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)
|
||||
|
||||
## 1.8.1 - 23 March 2023
|
||||
|
||||
@@ -41,6 +41,11 @@ export const DataFlowPaths = ({
|
||||
|
||||
const { codeFlows, ruleDescription, message, severity } = dataFlowPaths;
|
||||
|
||||
React.useEffect(() => {
|
||||
// Make sure to update the selected code flow if the data flow paths change
|
||||
setSelectedCodeFlow(dataFlowPaths.codeFlows[0]);
|
||||
}, [dataFlowPaths]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<VerticalSpace size={2} />
|
||||
|
||||
Reference in New Issue
Block a user