Hi,
I am using check box in one page.after select the check box then click submit.i want if i open that page again before select checkbox display checkd.
const [user, setusers] = useState([]);
const onValueChange = (item, index) => {
console.log("tes",item.label);
const newdata = user.map((newitem) => {
if (newitem.value == item.value) {
return {
...newitem,
checked: index,
};
}
return newitem;
});
setusers(newdata);
let slectt = user.filter((e) => e.checked == false);
};
disabled={false} style={styles.checkbox} boxType={"circle"} value={item.checked} onChange={() => onValueChange(item, !item.checked)} tintColors={{ true: "#F14A16", false: "grey" }} />
Sanjay Mrinal Kumar KodangiPosted Feb 21, 2022, 4:06 PM