Inconsistent parameters received on toggleSelection handler of selectTable HOC
See original GitHub issueRight now, if you use the default input
component, the toggleSelection
handler gets called with these parameters:
onClick={(e)=>{
const { shiftKey } = e;
e.stopPropagation();
props.onClick(props.id, shiftKey, props.row);
}}
If you use a custom SelectInputComponent
, the toggleSelection
receives the SyntheticEvent
object from React
. So it makes it impossible to know, for example, which row was clicked.
I think both methods should receive the same arguments.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Inconsistent parameters received on toggleSelection handler ...
One possible solution: Wrap the call to toggleSelection in this line with another function that passes the correct arguments in (same way it's ......
Read more >Why toggleSelection and isSelected method are receiving ...
The two handlers of interest are onClick (which maps to toggleSelection) and checked, which maps to isSelected. Notice the id here.
Read more >material-ui/core/CHANGELOG.md - UNPKG
Each warning comes with a simple message that explains how to handle the deprecation. ... 594, - [Select] Fix height inconsistency between input...
Read more >Cisco Prime Infrastructure Classic View Configuration Guide ...
To get the automated feedback enabled, you must configure your Mail Server Configuration by choosing Administration > Settings > Mail Server Configuration.
Read more >User Guide - Trifacta Documentation
When a toolbar item is selected, the Transformer page is pre-populated with settings and values to get you started. As needed.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah, that works 👍
Just as an opinion, it would be nice if the user wouldn’t need to know how the HOC internally works in order to implement a custom Select Input component. Regardless of the Select Input component used on the table, the
toggleSelection
handler should receive the same parameters.I will close this issue. Thanks for your help!
you get the data you are asking for in the
props
.Add this line to your
render
just before you return and you will see the props there…You have to replicate the functionality of the default component otherwise it won’t work. Here is the source code pasted (it is in the code)…