fix: fixed runProgram button being disabled if program is invalid
ref: N25B-450
This commit is contained in:
@@ -238,12 +238,15 @@ function VisProgPage() {
|
||||
const [programValidity, setProgramValidity] = useState<boolean>(true);
|
||||
const {isProgramValid, severityIndex} = useFlowStore();
|
||||
|
||||
const validity = () => {return isProgramValid();}
|
||||
|
||||
useEffect(() => {
|
||||
setProgramValidity(isProgramValid);
|
||||
setProgramValidity(validity);
|
||||
// the following eslint disable is required as it wants us to use all possible dependencies for the useEffect statement,
|
||||
// however this would cause unneeded updates
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [severityIndex]);
|
||||
console.log(programValidity);
|
||||
return (
|
||||
<>
|
||||
<VisualProgrammingUI/>
|
||||
|
||||
Reference in New Issue
Block a user