Forum Discussion
editProps not opening edit pane
I have some custom formatting using tileProps on a sharepoint list. It was working fine and then suddenly stopped the other day. Even if I pare down the json to only my button with the customRowAction it won't open the edit panel and throws javascript errors. Any thoughts?
Code:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"tileProps": {
"hideSelection": true,
"height": "385",
"width": "300",
"formatter": {
"elmType": "div",
"style": {
"align-items": "stretch",
"margin": "3px 2px",
"background-color": "#fbfbfb",
"height": "375px",
"overflow": "inherit",
"border-radius": "2px",
"box-shadow": "1px 1.6px 3.6px 0 #00000024, 1px 0.3px 0.9px 0 #00000024"
},
"children": [
{
"elmType": "div",
"style": {
"width": "100%",
"height": "32px",
"position": "absolute",
"bottom": "10px",
"justify-content": "space-around",
"text-align": "center"
},
"children": [
{
"elmType": "button",
"customRowAction": {
"action": "editProps"
},
"attributes": {
"title": "Submit"
},
"style": {
"height": "32px",
"padding": "0 16px",
"color": "#333",
"border": "1px solid #8a8886",
"background-color": "white",
"cursor": "pointer",
"font-size": "14px",
"font-weight": "600",
"line-height": "1.4",
"border-radius": "2px"
},
"children": [
{
"elmType": "span",
"txtContent": "Submit"
}
]
}
]
}
]
}
}
}
Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> <URL> 'unsafe-eval' 'nonce-0ed1d478-c84a-4a3d-ab95-ad6f195ae5fe'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
- BB-SPDevCopper Contributorbump. is there something wrong with the way I am implementing the editProps action? It used to work and then stopped. The javascript error logs in the console every click when it should open the edit pane.
- BB-SPDevCopper Contributor
I went back in today and it's all working again with no changes
- emersonbruceCopper Contributorwelcome to cloud...