You should look at this post which describes how to configure your data to allow for what you want to do. The important part is that you will need each data element configured in the following manner (along with whatever other properties you desire):
{
"value": { // The rows value.
"keyOne": { // Custom cell configuration.
"value": "First Column Value"
},
"keyTwo": { // Custom cell configuration.
"value": "Second Column Value"
},
"keyThree": { // Custom cell configuration.
"value": "Third Column Value"
}
},
"style": { // Custom row styles.
}
}
THEN in your onClick event, you’ll want to perform your logic while applying colors to the data[rowIndex].style.backgroundColor
property.
#entirely pseudo-code
for row_index in range(len(self.props.data)):
condition_met = data[row_index].value.keyOne == 'Color this row'
if condition_met:
data[row_index].style.backgroundColor = "#FFFFFF00" #desired color here