Open jbsamonte15 opened 1 year ago
Hey @jbsamonte15, you can move the onPress={() => handleRowSelect(row)}
to the DataTable.Cell
:
<DataTable.Cell onPress={() => handleRowSelect(row)}>
<Checkbox
status={selectedRows.includes(row.id) ? 'checked' : 'unchecked'}
/>
</DataTable.Cell>
Hi @lukewalczak may I ask why is it the case when we're binding it on a DataTable Cell? This may be of help if it is shared on the official documentation moving forward.
P.S. Code works
Current behaviour
When I'm trying to click the checkbox inside a data table, it is not working. For context, I'm trying to run this on a web app.
Expected behavior
The expected behavior is that the checkbox will be enabled upon clicking it.
How to reproduce?
Sample code of the issue https://snack.expo.dev/HAg0OKrpW
Preview
https://github.com/callstack/react-native-paper/assets/123606236/ff453885-9795-4e5b-90a4-ddd7be1d9de0
What have you tried so far?
Switched the dependencies versions. ex. downgrading react-native-paper to a lower stable release
Your Environment