Skip to content

facing issue in IE while updating set for one array item #2

@coredevsushant

Description

@coredevsushant

In my senerio, I have 3 left operants with prepopulated values with respective operant and right operant values as below

[{"ctype":"Condition","coperator":1,"leftOperandId":10,"leftOperandText":"criteria1","rightOperandId":["prepoulated -1"],"rightOperandText":["prepoulated -1"]},{"ctype":"Condition","coperator":2,"leftOperandId":12,"leftOperandText":"criteria2","rightOperandId":["prepoulated -2"],"rightOperandText":["prepoulated -2"]},{"ctype":"Condition","coperator":3,"leftOperandId":13,"leftOperandText":"criteria3","rightOperandId":["prepoulated -3"],"rightOperandText":["prepoulated -3"]}]

Now I am trying to update 1st right operant value to something as "abc"
then as soon as I try to enter one keyword 2nd right operant value 1st right operant values start changes as "ab" as soon as I enter another keyword 1st right operant again will update as "abc"

I have not found any console errors and in Chrome same code is working

I have used standard code structure as given in the example code as follows
codition.js
handleChange = (obj) => {
this.props.query.set(obj);
}

I have created individual components for right operands and on change, I am calling following function

handleChangeEventExtn = (event) => {
let obj = {};
let eventObj = {
name: '', value: []
};
let _value = [];
if (event.target.value !== '') {
_value = event.target.value.split(',');
}
eventObj.name = event.target.name;
eventObj.value = _value;
obj[eventObj.name] = eventObj.value;

    eventObj.name = 'rightOperandText';
    eventObj.value = _value;
    obj[eventObj.name] = eventObj.value;

 
    this.props.handleChangeEvent(obj);

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions