Merge pull request #12180 from backstage/camilal/fix-search-modal-context

[Search]: Fix search modal context scope
This commit is contained in:
Camila Belo
2022-06-21 16:07:52 +02:00
committed by GitHub
3 changed files with 76 additions and 4 deletions
+13
View File
@@ -0,0 +1,13 @@
---
'@backstage/plugin-search': patch
---
To allow people to use a global search context in the search modal, the code for the search modal has been changed to only create a local search context if there is no parent context already defined.
If you want to continue using a local context even if you define a global one, you will have to wrap the modal in a new local context manually:
```tsx
<SearchContextProvider>
<SearchModal toggleModal={toggleModal} />
</SearchContextProvider>
```