[ES|QL] Allows editing values (#217780)

## Summary

My refactor caused a bug, in editing the button wasn't active. This PR
is fixing it

<img width="1649" alt="image"
src="https://github.com/user-attachments/assets/4da7eace-8b44-49a6-b3a5-9908ce16b63b"
/>
This commit is contained in:
Stratoula Kalafateli 2025-04-10 10:10:46 +02:00 committed by GitHub
parent 579dbae6a1
commit 15d3e26678
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,7 +129,8 @@ export function ESQLControlsFlyout({
useEffect(() => {
const variableNameWithoutQuestionmark = variableName.replace(/^\?+/, '');
const variableExists = checkVariableExistence(esqlVariables, variableName);
const variableExists =
checkVariableExistence(esqlVariables, variableName) && !isControlInEditMode;
setFormIsInvalid(
!variableNameWithoutQuestionmark ||
variableExists ||
@ -137,6 +138,7 @@ export function ESQLControlsFlyout({
!controlState?.availableOptions.length
);
}, [
isControlInEditMode,
areValuesValid,
controlState?.availableOptions.length,
esqlVariables,