You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to use two react-native-select-two component in my Js Class. Unfortunately after change one of them, another select selected data changes.
state variables name is different.
how can i use two Select Two component ?
The text was updated successfully, but these errors were encountered:
the problem basically is not of librarie, the problem is the way you implement, let me explain it, you are using redux I guess redux is inmutable but in this case is not true, for solve this you have to make this way
let neighbords_subscribes = neighborhoods.map((value:any) => ({...value}));
or
let neighbords_subscribes:any = [];
neighborhoods.forEach( (element:any) => {
let temp:any = new Object();
for (var name in element) {
temp[name] = element[name]
}
neighbords_subscribes.push(temp);
});
where neighborhoods is the array of objects from redux and here you make a real deep copy, remember map return new array, or foreach is the same in this case, choose what you want, so each time you visita page you have to run this function and solve the problem.
i want to use two react-native-select-two component in my Js Class. Unfortunately after change one of them, another select selected data changes.
state variables name is different.
how can i use two Select Two component ?
The text was updated successfully, but these errors were encountered: