sp-dev-docs
sp-dev-docs copied to clipboard
customCardProps stop working after column is updated using setValue
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
Declarative list formatting
Developer environment
Windows
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [X] 💥 Microsoft Edge
- [X] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [ ] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
- browser version
- SPFx version
- Node.js version
- etc
Describe the bug / error
This issue appear using Custom List formatting and object customCardProps. Scenario has 2 Button objects:
- First button call "customCardProps"
- Second button update field using "setValue " When second button is called and update field, the object "customCardProps" from first button stops working.
Image steps:
Shows when customCardProps stop working after setValue update.
Code sample: Code used to reproduce the error, just use default Column "Title"
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"hideColumnHeader": true,
"hideSelection": true,
"rowFormatter": {
"elmType": "div",
"style": {
"cursor": "pointer"
},
"children": [
{
"elmType": "button",
"txtContent": "click me",
"customCardProps": {
"openOnEvent": "click",
"beakStyle": {},
"isBeakVisible": true,
"directionalHint": "topCenter",
"formatter": {
"elmType": "div",
"children": [
{
"elmType": "div",
"style": {
"cursor": "pointer"
},
"txtContent": "Click to update",
"customRowAction": {
"action": "setValue",
"actionInput": {
"Title": "='Value1 to '+ if(Number(@now)%7==0,1,if(Number(@now)%7==1,2,if(Number(@now)%7==2,3,if(Number(@now)%7==3,4,if(Number(@now)%7==4,5,6)))) + ' set'"
}
}
}
]
}
}
},
{
"elmType": "div",
"style": {
"padding": "0 10px 0 10px"
},
"txtContent": "[$Title]"
},
{
"elmType": "button",
"txtContent": "random update",
"customRowAction":{
"action": "setValue",
"actionInput": {
"Title": "update setvalue and dialog stops working...."
}
}
}
]
}
}
Steps to reproduce
- Create Default List
- Add sample code
- Click first button and validate actions,
- click 2 button and validate action,
- return to 1 button and click and validate "customCardProps" appears
Expected behavior
customCardProps should continue to be available/work after the field is updated using secondary object using "setValue".
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi @shagra-ms, Made additional tests and would like to address you the following issue.
Will take a look
@shagra-ms thanks. i will wait for the update.