core: add changeset file
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
---
|
||||
'@backstage/plugin-search-react': minor
|
||||
---
|
||||
|
||||
The `<SearchResultList />` component now accepts an optional property `disableRenderingWithNoResults` to disable rendering when no results are returned.
|
||||
Possibility to provide a custom no results component if needed through the `noResultsComponent` property.
|
||||
|
||||
Examples:
|
||||
|
||||
_Rendering a custom no results component_
|
||||
|
||||
```jsx
|
||||
<SearchResultList
|
||||
query={query}
|
||||
noResultsComponent={<ListItemText primary="No results were found" />}
|
||||
/>
|
||||
```
|
||||
|
||||
_Disable rendering when there are no results_
|
||||
|
||||
```jsx
|
||||
<SearchResultList query={query} disableRenderingWithNoResults />
|
||||
```
|
||||
Reference in New Issue
Block a user