fixed the issue with shared reference of the conditionValue object across components, causing changes made in one component to affect the other
This commit is contained in:
@@ -9500,8 +9500,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
tmpConditionValue.value = "equals";
|
||||
setTmpConditionValue(tmpConditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "equals";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"equals"}
|
||||
@@ -9511,8 +9512,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
tmpConditionValue.value = "does not equal";
|
||||
setTmpConditionValue(tmpConditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "does not equal";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"does not equal"}
|
||||
@@ -9522,8 +9524,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
conditionValue.value = "startswith";
|
||||
setConditionValue(conditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "startswith";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"starts with"}
|
||||
@@ -9533,8 +9536,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
conditionValue.value = "endswith";
|
||||
setConditionValue(conditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "endswith";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"ends with"}
|
||||
@@ -9544,8 +9548,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
conditionValue.value = "contains";
|
||||
setConditionValue(conditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "contains";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"contains"}
|
||||
@@ -9555,8 +9560,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
conditionValue.value = "contains_any_of";
|
||||
setConditionValue(conditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "contains_any_of";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"contains_any_of"}
|
||||
@@ -9566,8 +9572,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
conditionValue.value = "matches regex";
|
||||
setConditionValue(conditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "matches regex";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"matches regex"}
|
||||
@@ -9577,8 +9584,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
conditionValue.value = "larger than";
|
||||
setConditionValue(conditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "larger than";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"larger than"}
|
||||
@@ -9588,8 +9596,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
conditionValue.value = "less than";
|
||||
setConditionValue(conditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "less than";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"less than"}
|
||||
@@ -9599,8 +9608,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<MenuItem
|
||||
style={menuItemStyle}
|
||||
onClick={(e) => {
|
||||
conditionValue.value = "is empty";
|
||||
setConditionValue(conditionValue);
|
||||
const newConditionValue = { ...conditionValue };
|
||||
newConditionValue.value = "is empty";
|
||||
setConditionValue(newConditionValue);
|
||||
setVariableAnchorEl(null);
|
||||
}}
|
||||
key={"is empty"}
|
||||
|
||||
Reference in New Issue
Block a user