diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html index 8aab8280ac..1b15d43e30 100644 --- a/demo-shell/src/app/components/files/files.component.html +++ b/demo-shell/src/app/components/files/files.component.html @@ -211,7 +211,8 @@ - + + +
+ + Sticky Header + +
Upload
diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts index 809422bfbf..b7ea355d10 100644 --- a/demo-shell/src/app/components/files/files.component.ts +++ b/demo-shell/src/app/components/files/files.component.ts @@ -189,6 +189,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { permissionsStyle: PermissionStyleModel[] = []; infiniteScrolling: boolean; + stickyHeader: boolean; warnOnMultipleUploads = false; thumbnails = false; enableCustomPermissionMessage = false; diff --git a/docs/content-services/components/document-list.component.md b/docs/content-services/components/document-list.component.md index 362f289091..3705d4d3b4 100644 --- a/docs/content-services/components/document-list.component.md +++ b/docs/content-services/components/document-list.component.md @@ -82,6 +82,7 @@ Displays the documents from a repository. | where | `string` | | Filters the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) list using the _where_ condition of the REST API (for example, isFolder=true). See the REST API documentation for more information. | | currentFolderId | | | The ID of the folder node to display or a reserved string alias for special sources | | rowFilter | | | Custom function to choose whether to show or hide rows. See the [Row Filter Model](../models/row-filter.model.md) page for more information. | +| stickyHeader | `boolean` | false | Toggles the sticky header mode. | ### Events diff --git a/lib/content-services/document-list/components/document-list.component.html b/lib/content-services/document-list/components/document-list.component.html index 2e7f9baf48..a2526e8c01 100644 --- a/lib/content-services/document-list/components/document-list.component.html +++ b/lib/content-services/document-list/components/document-list.component.html @@ -14,6 +14,7 @@ [noPermission]="noPermission" [showHeader]="!isEmpty() && showHeader" [rowMenuCacheEnabled]="false" + [stickyHeader]="stickyHeader" (showRowContextMenu)="onShowRowContextMenu($event)" (showRowActionsMenu)="onShowRowActionsMenu($event)" (executeRowAction)="onExecuteRowAction($event)" diff --git a/lib/content-services/document-list/components/document-list.component.scss b/lib/content-services/document-list/components/document-list.component.scss index 457d1b1be4..99a4178137 100644 --- a/lib/content-services/document-list/components/document-list.component.scss +++ b/lib/content-services/document-list/components/document-list.component.scss @@ -9,6 +9,11 @@ margin-top: 2px; } + .adf-sticky-document-list { + height: 310px; + overflow-y: auto; + } + .adf-datatable-selected > svg { fill: mat-color($accent); width: 32px; diff --git a/lib/content-services/document-list/components/document-list.component.ts b/lib/content-services/document-list/components/document-list.component.ts index ffecb26e02..41dd8ee3d3 100644 --- a/lib/content-services/document-list/components/document-list.component.ts +++ b/lib/content-services/document-list/components/document-list.component.ts @@ -235,6 +235,10 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte @Input() imageResolver: any | null = null; + /** Toggles the sticky header mode. */ + @Input() + stickyHeader: boolean = false; + _currentFolderId: string = null; /** The ID of the folder node to display or a reserved string alias for special sources */ diff --git a/lib/core/about/about.component.ts b/lib/core/about/about.component.ts index a2f7771e96..3c3d1f9e19 100644 --- a/lib/core/about/about.component.ts +++ b/lib/core/about/about.component.ts @@ -42,10 +42,10 @@ export class AboutComponent implements OnInit { /** Commit corresponding to the version of ADF to be used. */ @Input() githubUrlCommitAlpha = 'https://github.com/Alfresco/alfresco-ng2-components/commits/'; - + /** Toggles showing/hiding of extensions block. */ @Input() showExtensions = true; - + /** Regular expression for filtering dependencies packages. */ @Input() regexp = '^(@alfresco)';