Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
coredevsushant opened this issue Jul 24, 2019 · 0 comments
Open

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

coredevsushant opened this issue Jul 24, 2019 · 0 comments

Comments

@coredevsushant
Copy link

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);

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant