documentation review (#5802)

This commit is contained in:
Eugenio Romano
2020-06-22 15:20:00 +01:00
committed by GitHub
parent 20eaae5257
commit 75b6c436d3
30 changed files with 282 additions and 96 deletions

View File

@@ -75,7 +75,7 @@ Displays the documents from a repository.
| rowStyle | `string` | | The inline style to apply to every row. See the Angular NgStyle docs for more details and usage examples. |
| rowStyleClass | `string` | | The CSS class to apply to every row |
| selectionMode | `string` | "single" | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| showHeader | `ShowHeaderMode` | "data" | Indicate which is the desired behaviour for the header. Can have 3 values `always`, `never` and `data`. `data` won't display the header if the datatable is empty and will display it otherwise. |
| showHeader | `string` | | Toggles the header |
| sorting | `string[]` | ['name', 'asc'] | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override the default sorting detected by the component based on columns. |
| sortingMode | `string` | "client" | Defines sorting mode. Can be either `client` (items in the list are sorted client-side) or `server` (the ordering supplied by the server is used without further client-side sorting). Note that the `server` option _does not_ request the server to sort the data before delivering it. |
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |

View File

@@ -4,22 +4,13 @@ Added: v3.9.0
Status: Active
Last reviewed: 2020-19-06
---
# [SearchHeader component](../../../lib/content-services/src/lib/search/components/search-header/search-header.component.ts "Defined in search-header.component.ts")
Displays a button opening a menu designed to filter a document list.
![SearchHeader demo](../../docassets/images/search-header-demo.png)
## Contents
- [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [example](#example)
- [See also](#see-also)
## Basic usage
**app.component.html**
@@ -45,9 +36,10 @@ Displays a button opening a menu designed to filter a document list.
**app.config.json**
```json
```
This component is designed to be used as transcluded inside the document list component. With the good configurations it will allow the user to filter the data displayed by that component.
This component is designed to be used as transcluded inside the [document list component](../../content-services/components/document-list.component.md). With the good configurations it will allow the user to filter the data displayed by that component.
## Class members
@@ -55,22 +47,17 @@ This component is designed to be used as transcluded inside the document list co
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| col | `DataColumn` | | The column the filter will be applied on. |
| currentFolderNodeId | `string` | | The id of the current folder of the document list. |
| maxItems | `number` | | Pagination parameter coming from the document list. |
| skipCount | `number` | | An other pagination parameter coming from the document list. |
| widgetContainer | `SearchWidgetContainerComponent` | | View of the child facet widget generated inside the menu. Used to control that widget through the apply and clear buttons. |
| isActive | `boolean` | | A boolean telling if the current data displayed in the document list is affected by that filter. |
| category | `SearchCategory` | | The category of the filter. It contains the information regarding the way the filter is filtering the data. This is get with the column information and the configuration of the search-header inside the config file |
| isFilterServiceActive | `boolean` | | Boolean to check if the SearchHeaderQueryBuilderService is active |
| col | [`DataColumn`](../../../lib/core/datatable/data/data-column.model.ts) | | The column the filter will be applied on. |
| currentFolderNodeId | `string` | | The id of the current folder of the document list. |
| maxItems | `number` | | Maximum number of search results to show in a page. |
| skipCount | `number` | | The offset of the start of the page within the results list. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| update | `EventEmitter<NodePaging>` | Emitted when the result of the filter is received from the API, should be passed to the `node` member of the document list. |
| clear | `EventEmitter<any>` | Emitted when the last of all the filters is cleared. This should be used to trigger a `reload()` of the document list with no `node` member. |
| clear | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the last of all the filters is cleared. |
| update | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/NodePaging.md)`>` | Emitted when the result of the filter is received from the API. |
## See also