Skip to content

Commit f005044

Browse files
committed
Merge branch 'knewbury01/webcomponent-react' of github.com:advanced-security/codeql-sap-js into knewbury01/webcomponent-react
2 parents 111e72c + b16ebdc commit f005044

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

javascript/frameworks/ui5/test/models/source-react/controlledcomponent.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ function ControlledComponent( { props }) {
99
const handleButtonPress1 = () => {
1010
// Access the input value via the hook
1111
console.log('Current input value:', inputRef1.current.value); // SOURCE - not detected
12-
};
12+
$("#id").html(inputRef1.current.value); // $ Alert
13+
}
1314

1415
const handleButtonPress2 = event => {
1516
setInputValue(event.target.value); // SOURCE - detected
16-
console.log('Current input value:', inputRef2); // not directly a source
17+
console.log('Current input value:', inputRef2);
18+
$("#id").html(inputRef2); // $ Alert
1719
};
1820

1921
return (
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
| controlledcomponent.tsx:15:23:15:40 | event.target.value | |
1+
| controlledcomponent.tsx:11:49:11:71 | inputRe ... t.value | |
2+
| controlledcomponent.tsx:12:24:12:46 | inputRe ... t.value | |
3+
| controlledcomponent.tsx:16:23:16:40 | event.target.value | |
24
| functionalcomponentsetstate.tsx:7:23:7:40 | event.target.value | |
35
| uncontrolledcomponent.tsx:9:24:9:41 | event.target.value | |

0 commit comments

Comments
 (0)