Add example

Signed-off-by: kielosz <kielosz@gmail.com>
This commit is contained in:
kielosz
2022-06-02 11:32:13 +02:00
parent 5a4ffaba0b
commit 9813ef27ce
+22 -1
View File
@@ -2,4 +2,25 @@
'@backstage/plugin-org': patch
---
Added the ability to use an additional `filter` when fetching groups in `MyGroupsSidebarItem` component
Added the ability to use an additional `filter` when fetching groups in `MyGroupsSidebarItem` component. Example:
```diff
// app/src/components/Root/Root.tsx
<SidebarPage>
<Sidebar>
//...
<SidebarGroup label="Menu" icon={<MenuIcon />}>
{/* Global nav, not org-specific */}
//...
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
<MyGroupsSidebarItem
singularTitle="My Squad"
pluralTitle="My Squads"
icon={GroupIcon}
+ filter={{ 'spec.type': 'team' }}
/>
//...
</SidebarGroup>
</ Sidebar>
</SidebarPage>
```