diff --git a/.changeset/many-flowers-sparkle.md b/.changeset/many-flowers-sparkle.md new file mode 100644 index 000000000..b61b55e25 --- /dev/null +++ b/.changeset/many-flowers-sparkle.md @@ -0,0 +1,5 @@ +--- +"@shopware-ag/meteor-admin-sdk": patch +--- + +Allow toggling the sw-page smart bar diff --git a/packages/admin-sdk/docs/docs/guide/2_api-reference/ui/menuItem.md b/packages/admin-sdk/docs/docs/guide/2_api-reference/ui/menuItem.md index c0e9a8d8c..ffae2278b 100644 --- a/packages/admin-sdk/docs/docs/guide/2_api-reference/ui/menuItem.md +++ b/packages/admin-sdk/docs/docs/guide/2_api-reference/ui/menuItem.md @@ -1,15 +1,16 @@ # Menu Item ### Add menu item -Add a new menu item to the Shopware admin menu. The content of the menu item module is determined by your `locationId`. +Add a new menu item to the Shopware admin menu. The content of the menu item module is determined by your `locationId`. A specific view or a set of actions can be triggered based on the `locationId`. -#### Usage: +#### Usage: ```ts ui.menu.addMenuItem({ label: 'Test item', locationId: 'your-location-id', displaySearchBar: true, + displaySmartBar: true, parent: 'sw-catalogue', }) ``` @@ -20,6 +21,7 @@ ui.menu.addMenuItem({ | `label` | true | | The label of the tab bar item | | `locationId` | true | | The id for the content of the menu item module | | `displaySearchBar` | false | true | Toggles the sw-page search bar on/off | +| `displaySmartBar` | false | true | Toggles the sw-page smart bar on/off | | `parent` | false | 'sw-extension' | Determines under which main menu entry your item is displayed | | `position` | false | 110 | Determines the position of your menu item | @@ -34,6 +36,7 @@ if (location.is(sw.location.MAIN_HIDDEN)) { ui.menu.addMenuItem({ label: 'Test item', displaySearchBar: true, + displaySmartBar: true, locationId: 'your-location-id', parent: 'sw-catalogue', }); @@ -43,4 +46,4 @@ if (location.is(sw.location.MAIN_HIDDEN)) { if (location.is('your-location-id')) { document.body.innerHTML = '