Formatting JSON of subElements from commandBar not working
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
- [ ] 💥 Internet Explorer
- [X] 💥 Microsoft Edge
- [X] 💥 Google Chrome
- [X] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [ ] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
- Firefox v131.0.3
- Chrome
- Microsoft Edge
Describe the bug / error
Hi, here the detail for the bug
Formatting JSON for hiding sub-elements under the "Export" button in a SharePoint list.
What Actually Happens
The JSON formatting to hide sub-elements of the "Export" button (like Export to excel using the key "exportExcel") no longer works. However, using the export key "export" to hide the main "Export" button globally still functions as expected.
I believe this issue affects all sub-elements within SharePoint lists since the new interface update, as it used to work correctly before.
Steps to reproduce
- Create a view and open format view panel
- Use JSON to hide Export to Excel submenu from Export button
- Insert this JSON { "commandBarProps": { "commands": [ { "key": "exportExcel", "hide": true } ] } }
- The submenu is not hide
Expected behavior
What Should Happen
When using JSON formatting to hide sub-elements (e.g., exportExcel) of the "Export" button in a SharePoint list using the key "exportExcel", it should hide only the specified sub-elements while keeping the main "Export" button intact.