Merge pull request #9364 from backstage/vinzscam/search-modal-fetch-on-open

SearchModal invoke search only when visible
This commit is contained in:
Camila Belo
2022-02-14 07:38:11 +01:00
committed by GitHub
20 changed files with 318 additions and 108 deletions
+2 -4
View File
@@ -114,15 +114,13 @@ const routes = (
In `Root.tsx`, add the `SidebarSearchModal` component:
```bash
import { SidebarSearchModal, SearchContextProvider } from '@backstage/plugin-search';
import { SidebarSearchModal } from '@backstage/plugin-search';
export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarPage>
<Sidebar>
<SidebarLogo />
<SearchContextProvider>
<SidebarSearchModal />
</SearchContextProvider>
<SidebarSearchModal />
<SidebarDivider />
...
```