RowClickFunction could have other returns besides string
See original GitHub issueI would like to raise a dissussion about the data-grid prop
rowClick?: string | RowClickFunction;
My question is on top of RowClickFunction, why does it always expect a string? I say for the case when the row is not valid when redirecting I could return a void, undefined or false, what do you think?
Why would RowClickFunction always need to return string and for me to keep it on the page I have to add a return ''
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
JavaScript - Clickable table row except last 2 columns
I have tried using the following line but just can't seem to get it to work. Is there a line of code I'm...
Read more >Flask WTForms example for dynamic list (javascript) with data ...
Example of a dynamic list (add, remove button handled on client side) with data stored in a classic String in database. Works with...
Read more >Javascript/jQuery problems - SitePoint
I've got the latest version of jquery, but I think the .on() works a little bit different, right? Yeah, it does: Normal syntax:...
Read more >Create interactive tables with Tabulator - Creative Bloq
Build dynamic tables quickly with Tabulator.
Read more >Reader question – How does the Flexible View ... - XPage.me
One question I have is how best to deal with response documents ... can be configured to include the position data in addition...
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
As I understand, in your case, a click on a datagrid row may or may not have an action. If this is the case, this should be handled before the
rowClick
function is called, because the pointer shows that a row is clickable. It would be misleading for end users to indicate with the mouse pointer that a row is clickable, then do nothing on click.So I suggest adding something like the current
isRowSelectable
prop to the Datagrid - why notisClickable
?But I don’t think we should accept a false or null response to
rowClick
.This is not a use case we want to support out of the box. If you need that UX, you’ll have to pass your own DatagridRow, or a build a custom Datagrid altogether.