SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.22k stars 988 forks source link

List view formatting: Some commandBarProps keys not working in MS lists (only Sharepoint list) #9711

Open elsiegit opened 2 weeks ago

elsiegit commented 2 weeks ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

None

What browser(s) / client(s) have you tested

Additional environment details

Tested in edge and chrome

Describe the bug / error

When using commandBarProps in view formatting JSON the "export": "hide" and "new": "Create" (for custom text on new button) are not working in new Microsoft list URL but are behaving as expected in traditional SharePoint list URL

Also there is no key available to hide the new 'Forms' button from the command bar.

NOT working URL: https://xxx.sharepoint.com/sites/xxx/Lists/xxx/Cal.aspx?viewid=0e35b3b2-69af-48e6-83b1-2d6bfa468578&env=WebViewList

CORRECTLY working URL: https://xxx.sharepoint.com/sites/xxx/Lists/xxx/1%20Create%20CPI.aspx

image image

Steps to reproduce

"commandBarProps": { "commands": [ { "key": "editInGridView", "hide": true }, { "key": "copyLink", "hide": true }, { "key": "alertMe", "hide": true }, { "key": "manageAlert", "hide": true }, { "key": "comment", "hide": false }, { "key": "share", "hide": true }, { "key": "automate", "hide": true }, { "key": "integrate", "hide": true }, { "key": "export", "hide": true }, { "key": "exportCSV", "hide": true }, { "key": "exportExcel", "hide": true }, { "key": "new", "text": "Create" } ] }

Expected behavior

I expected the formatting to be effective in MS lists as well as SharePoint lists I expected there to be a key available to hide the new Forms button