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.

Bug(TableSelectRow): the checked prop is blocking the rows

See original GitHub issue

##TableSelectRow checked prop is blocking the rows

  • carbon-components
  • carbon-components-react

Detailed description

The TableSelectRow’s checked prop is marked as required. But when we use it inside a DataTable and with the getSelectionProps and onSelect and so on, it’s not needed. It works very well without setting the checked props at all. When I set the checked props thought to true or false, because otherwise I get a console error, it checks/unchecks all rows by default and blocks them so that it’s impossible to uncheck/check them manually (by clicking on the boxes in the UI).

Can we make this checked prop optional instead of required ?

Sandbox

Here is a sandbox to see a live example. Try unselecting a row. https://codesandbox.io/s/codesandbox-y4umm

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fabienchn-zzcommented, Oct 14, 2019

Aw yeah, you are right ! This was actually due to my tests not having the getSelectionProps… Sorry about that ! Thank you for your quick responses

0reactions
emyarodcommented, Oct 10, 2019

@fabienchn when I remove the checked attribute in your example, no prop type warnings are emitted since it seems to receive the attribute from getSelectionProps

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve blocking problem caused by lock escalation - SQL ...
This article describes how to determine whether lock escalation is causing blocking and how to resolve the problem.
Read more >
Select row on click react-table - Stack Overflow
Some things, that I have tried include trying to set a className on click of the row. But I can't seem to find...
Read more >
67745: Too much row locks when using SELECT for UPDATE ...
Description: Hello, I think i meet a bug when I try to run a "SELECT FOR UPDATE" statement with a "LIMIT" clause and...
Read more >
State - CodeProject
In this article, we will talk about the top down (memoization) strategy to solve a popular DP problem: Climbing Stairs. Serverless HTTP With...
Read more >
Row selection and deletion (single row) - DataTables example
This is done by checking to see if the row already has a selected class, and if so removing it, but if not...
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