I am using reactJs and redux and fetching routers via redux-action of some buildings, i got stuck in an issue of checkbox where clicked on checkbox show flickering tick with a list of check-boxes. you can see in gif. these check-boxes are placed in a react component called react-slick.
Code Where the Routers fetched action call on Check true
this.props.fetchRouters(this.props.OneLinks, this.props.user.token)
.then(()=>{
let elements = document.getElementsByClassName("DefaultBox1");
unselectedold.forEach(function(i) {
for (let inp of elements) {
if (inp.type === "checkbox" && inp.name == i && inp.checked != false){
inp.checked = false;
}
}
});
});
Code where the Router fetched action call on Check false
this.props.fetchRouters(this.props.OneLinks, this.props.user.token)
.then(()=>{
let elements = document.getElementsByClassName("DefaultBox1");
unselected.forEach(function(idbldg) {
for (let inp of elements) {
if (inp.type === "checkbox" && inp.name == idbldg && inp.checked != false){
inp.checked = false;
}
}
});
});
Aucun commentaire:
Enregistrer un commentaire