forked from github/vscode-codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: functionality + UI to limit max path steps in MRVA results
- Loading branch information
Showing
6 changed files
with
94 additions
and
5 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
extensions/ql-vscode/src/view/common/MaxThreadFlowStepsBox.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { useCallback } from "react"; | ||
import { styled } from "styled-components"; | ||
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; | ||
import { Codicon } from "./icon"; | ||
|
||
const TextField = styled(VSCodeTextField)` | ||
width: 100%; | ||
`; | ||
|
||
type Props = { | ||
value: string; | ||
placeholder: string; | ||
onChange: (value: string) => void; | ||
|
||
className?: string; | ||
}; | ||
|
||
export const MaxThreadFlowStepsBox = ({ | ||
value, | ||
placeholder, | ||
onChange, | ||
className, | ||
}: Props) => { | ||
const handleInput = useCallback( | ||
(e: InputEvent) => { | ||
const target = e.target as HTMLInputElement; | ||
|
||
onChange(target.value); | ||
}, | ||
[onChange], | ||
); | ||
|
||
return ( | ||
<TextField | ||
placeholder={placeholder} | ||
value={value} | ||
type="number" | ||
onInput={handleInput} | ||
className={className} | ||
> | ||
<Codicon name="list-selection" label="Limit" slot="start" /> | ||
</TextField> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters