Adding a defaultClick customRowAction to a div in a SharePoint List with JSON Formatting

O365User58784 21 Reputation points
2021-03-10T20:34:57.7+00:00

I'm apply JSON formatting to a SharePoint list view, and I'm trying to make an entire div clickable by adding the customRowAction property to it, but it's not working. I'm able to add this property to a button, but would like to apply it to an entire div to launch the default SharePoint list item view form. Is this possible?

"customRowAction": {
"action": "defaultClick"
},

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-03-11T01:47:13.29+00:00

    Hi @O365User58784 ,

    No, it's not possible. By default, the div elements in JSON colmun formatting is not clickable. The propery customRowAction only works for button element.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.