core: add changeset file

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2022-10-02 10:31:35 +02:00
parent 41ee0f3711
commit bed5a1dc6e
+23
View File
@@ -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 />
```