mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1876] added custom empty result tag for search result control (#2940)
* [ADF-1876] added custom empty template for no search result * [ADF-1876] added custom empty result tag for search result control * [ADF-1876] added custom no search result tag for search control component * [ADF-1876] added documentation for template no result
This commit is contained in:
@@ -47,3 +47,18 @@ Displays a input text which shows find-as-you-type suggestions.
|
||||
Example of a component that uses the search control. In this example the search term is simply logged to the console
|
||||
but instead the component could emit an event to be consumed upstream, or it could trigger a change inside a search
|
||||
results component embedded inside the same component.
|
||||
|
||||
## Customizable template for no result
|
||||
It is possible to customize with your own template what to show when no result are found for the search.
|
||||
|
||||
```html
|
||||
<adf-search-control [highlight]="true"
|
||||
(optionClicked)="onItemClicked($event)"
|
||||
(submit)="onSearchSubmit($event)">
|
||||
<adf-empty-search-result>
|
||||
<!-- YOUR CUSTOM TEMPLATE HERE -->
|
||||
<span>YOUR CUSTOM MESSAGE</span>
|
||||
</adf-empty-search-result>
|
||||
</adf-search-control>
|
||||
```
|
||||
All you need to add is the `adf-empty-search-result` tag in the `adf-search-control` and then put inside the template you want to render when no results are found.
|
Reference in New Issue
Block a user