Does anyone know any easy way to add the "Link to Item" or "Edit Menu" to any column on SharePoint Online when the list is using the Modern Experience? It is simple when using the Classic Experience, but I have not found a good answer for doing this under the Modern Experience.
1 Answer
You can create column with name "Edit item" or something in Modern Experience and while creating column, go to "Column Formatting" section
And paste the below JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "editProps"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover",
"title": "Edit Item"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "Edit",
"class": "ms-font-xxl"
}
}
]
}
Go to your list view and now you should be able to see an edit icon for all of your rows. Click on it and editing on button click should work now.
Reference: Column Formatting in Modern Experience
-
how can I link a different column to the item, or show the menu? I mean, get all the options available in the Title column.– entrytonCommented Mar 5, 2021 at 13:55