react-native-material-kit
react-native-material-kit copied to clipboard
Select all checkbox method
We are rendering checkboxes in list view. I am setting rowData.status to true to all the list item but it is not working. however it is working when I switch the tab and come back to same tab again
<MKCheckbox checked={rowData.status} onPress={() => self.abc(rowData) }/>
It seems when you set rowData.status
to true
, it won't re-render the parent component. If that is the case I suggest to use state
or connect the component to redux
, It should solve the issue.
PS: To get more information about connecting a component to redux check react-redux out. It's very handy.