Single Click on Datagrid 2 doesnt work if cell is custom content

1
Hi all, So I have one Datagrid 2 that has cells that are populated by attribute and another by custom content. The issue is when it's custom content and I click on the text the selection doesn't occur. But if it's by attribute the selection occurs. Also, I would like to maintain the custom content because I wanted to use the widget for the double-click. Can anyone help? The highlighted red is the custom content.
asked
3 answers
0

Hi there,

 

It appears the problem is that using custom content adds an additional div element that blocks that click action:

image.png

 

To reduce the impact this div element has, you could apply a CSS style such as "display:contents" so all of the whitespace is clickable:

 

image.png

 

Which can be added using the dynamic class in the data grid column:

image.png

 

I couldn't find any CSS solutions to allow the content to be clicked as well. One fix to this would be to create a Javascript action that triggers the change in style once the content is clicked. But this might not work for future versions of Data Grid 2

image.png

 

 

Hope this helps,

Liam

answered
0

Hi,

 

Indeed this is a bug in the Data Grid 2. A pure CSS only solution is:

 

.table .td > .td-custom-content {

  pointer-events: none;

}

 

This is a generic solution and will work out of the box. Pointer-events is pretty good supported as far as I know. Probably not on older IE browsers. But chrome, edge, firefox should be fine for the newer versions. 

answered
0

Hi Helena,

 

Yes, this is a known Issue of the Datagrid2.

You can use the CSS Solutions from the Answers above.

 

Other Workaround would be to set the Custom Content in a Container and on this Container use a OnClick with your Microflow.

 

EDIT :  in the new Versions of DataGrid, there is the option to use "Double Click" 

image.png

 

Best Regards,

answered