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"
},

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,247 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,827 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,706 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,016 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