fix: fixed selected value getting reset for variables and refetch not going (#7115)

This commit is contained in:
SagarRajput-7 2025-02-15 00:23:33 +05:30 committed by GitHub
parent 966f11fd5c
commit 43a1fa53aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -150,11 +150,13 @@ function VariableItem({
let allSelected = false;
// The default value for multi-select is ALL and first value for
// single select
if (variableData.multiSelect) {
value = newOptionsData;
allSelected = true;
} else {
[value] = newOptionsData;
if (valueNotInList) {
if (variableData.multiSelect) {
value = newOptionsData;
allSelected = true;
} else {
[value] = newOptionsData;
}
}
if (variableData && variableData?.name && variableData?.id) {
@ -226,6 +228,9 @@ function VariableItem({
}
setErrorMessage(message);
}
setVariablesToGetUpdated((prev) =>
prev.filter((v) => v !== variableData.name),
);
},
},
);