sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Formatting JSON of subElements from commandBar not working

Open vDAKK opened this issue 1 year ago • 0 comments

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

  1. Create a view and open format view panel
  2. Use JSON to hide Export to Excel submenu from Export button
  3. Insert this JSON { "commandBarProps": { "commands": [ { "key": "exportExcel", "hide": true } ] } }
  4. 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.

vDAKK avatar Oct 24 '24 09:10 vDAKK