question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Select all' also selects disabled checkboxes / rows

See original GitHub issue

Describe the bug A disabled checkbox can’t be checked normally, but when you click ‘select all’, the disabled checkboxes are selected. The header bar indicates the selected rows as well.

To Reproduce Add ‘selection: true’, and something like

selectionProps: (rowData) => ({
   disabled: rowData.active === 'no'
})

Click the ‘select all’.

Expected behavior Disabled rows can never be selected, not on checkbox-click, and not with ‘select all’

Screenshots image (2 rows, disabled from selecting) image (after ‘select all’)

Desktop (please complete the following information):

  • MT version 1.39.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:20
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
jessewillardcomcommented, Aug 27, 2020

Here is the solution, although there select all gets a little buggy, not sure how to work around that:

https://stackblitz.com/edit/react-9prvyj

2reactions
freewheel70commented, Jan 18, 2021

Any update for this issue ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem - select all checkbox selects disabled row - Telerik
Hello, I have a grid and I'm disabled the row that has the approved FALSE, but when I check Select All it checks...
Read more >
React-table with disabled checkboxes - T Sai Deepak - Medium
Recently I wanted to implement a table with row selection and I had some disabled checkboxes in my data, what I observed is...
Read more >
Exclude disabled checkboxes when using Select All
I have added one checkbox outside the table "Select All" with id "chkbox". Now the below code is working fine. It is Selecting...
Read more >
The "select all" checkbox selects disabled check boxes
Hello, I'm using the settings.CommandColumn.SelectAllCheckboxMode property set to GridView SelectAllCheckBoxMode.Page.
Read more >
'Select all' Checkbox also selects disabled checkboxes / rows
'Select all' also selects disabled checkboxes / rows. Expected: Disabled rows can never be selected, not on checkbox-click, and not with 'select all'....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found