Question : how use checked multiple checkboxs react native flatlist
Answered by : hamaish-gill
onValueChange={newValue => onChangeValue(item, index, newValue)}
onChangeValue = (item, index, newValue) => { const newData = data.map(newItem => { if (newItem.id == item.id) { return { ...newItem, selected: newValue, } } return newItem }) setData(newData); }
Source : https://stackoverflow.com/questions/71920233/how-to-select-multiple-checkboxes-in-flatlist | Last Update : Wed, 17 Aug 22