-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTable - How to make rows disabled in order not to be selected when clicking on the SelectAll checkbox? #6972
Comments
Hey there @zbeedatm, it seems like this may have been fixed as I am unable to reproduce your experience. Going to close this as resolved, but feel free to comment here if you're still experience issues and I'll go ahead and reopen this. |
I had the same issue and It seems that adding a |
Hi @OmranAbazid , |
@SaloniRathi
|
What package(s) are you using?
carbon-components
carbon-components-react
Summary
I disabled the
<TableSelectRow>
but when clicking on SelectAll these rows are selected, and I need them to be unselected.Relevant information
Tried to apply the disabled attribute to
<TableRow>
but it didn't help!Note: I have a menu near the name of the row with "Info" option, so disabling the row might block this functionality -which is not wanted-
<TableBody> {rows.map(row => ( <TableRow key={row.id}> <TableSelectRow {...getSelectionProps({ row, onClick: event => { //console.log(row.id, event.target.checked); this.selectRule(row.id, event.target.checked) } }) } disabled={this.state.unattachedRulesTables[row.id] && this.state.unattachedRulesTables[row.id].length > 0}/> {row.cells.map(cell => ( <TableCell key={cell.id}>{cell.value}</TableCell> ))} </TableRow> ))} </TableBody>
The text was updated successfully, but these errors were encountered: