mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-11-23 23:49:08 -06:00
Use AutoSizeVirtualScrollStrategy
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/cdk": "^20.2.13",
|
"@angular/cdk": "^20.2.13",
|
||||||
|
"@angular/cdk-experimental": "^20.2.14",
|
||||||
"@angular/common": "~20.3.12",
|
"@angular/common": "~20.3.12",
|
||||||
"@angular/compiler": "~20.3.12",
|
"@angular/compiler": "~20.3.12",
|
||||||
"@angular/core": "~20.3.12",
|
"@angular/core": "~20.3.12",
|
||||||
|
|||||||
15
src-ui/pnpm-lock.yaml
generated
15
src-ui/pnpm-lock.yaml
generated
@@ -11,6 +11,9 @@ importers:
|
|||||||
'@angular/cdk':
|
'@angular/cdk':
|
||||||
specifier: ^20.2.13
|
specifier: ^20.2.13
|
||||||
version: 20.2.13(@angular/common@20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)
|
version: 20.2.13(@angular/common@20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)
|
||||||
|
'@angular/cdk-experimental':
|
||||||
|
specifier: ^20.2.14
|
||||||
|
version: 20.2.14(@angular/cdk@20.2.13(@angular/common@20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))
|
||||||
'@angular/common':
|
'@angular/common':
|
||||||
specifier: ~20.3.12
|
specifier: ~20.3.12
|
||||||
version: 20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)
|
version: 20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)
|
||||||
@@ -495,6 +498,12 @@ packages:
|
|||||||
vitest:
|
vitest:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
'@angular/cdk-experimental@20.2.14':
|
||||||
|
resolution: {integrity: sha512-oTqd8fV9m8HfzIpd1GXJ9OOKhTV/2D3hPfhZjG4puTQ5JeWcljVR2T/fZHpWGnNRoHJL5MkIkQP6338uJbX22Q==}
|
||||||
|
peerDependencies:
|
||||||
|
'@angular/cdk': 20.2.14
|
||||||
|
'@angular/core': ^20.0.0 || ^21.0.0
|
||||||
|
|
||||||
'@angular/cdk@20.2.13':
|
'@angular/cdk@20.2.13':
|
||||||
resolution: {integrity: sha512-h1jTkCmJ/rEQQMkxgKFMCBOrMfjZEnppgdekNmSTerwdVp4vdosTDTzFH/kwiOGFeRClffmvqQ2XLG8mQOKOtA==}
|
resolution: {integrity: sha512-h1jTkCmJ/rEQQMkxgKFMCBOrMfjZEnppgdekNmSTerwdVp4vdosTDTzFH/kwiOGFeRClffmvqQ2XLG8mQOKOtA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -7443,6 +7452,12 @@ snapshots:
|
|||||||
- tsx
|
- tsx
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
|
'@angular/cdk-experimental@20.2.14(@angular/cdk@20.2.13(@angular/common@20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))':
|
||||||
|
dependencies:
|
||||||
|
'@angular/cdk': 20.2.13(@angular/common@20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)
|
||||||
|
'@angular/core': 20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1)
|
||||||
|
tslib: 2.8.1
|
||||||
|
|
||||||
'@angular/cdk@20.2.13(@angular/common@20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)':
|
'@angular/cdk@20.2.13(@angular/common@20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@angular/common': 20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)
|
'@angular/common': 20.3.12(@angular/core@20.3.12(@angular/compiler@20.3.12)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2)
|
||||||
|
|||||||
@@ -44,7 +44,9 @@
|
|||||||
<div [ngbNavOutlet]="nav" class="mt-2"></div>
|
<div [ngbNavOutlet]="nav" class="mt-2"></div>
|
||||||
|
|
||||||
<cdk-virtual-scroll-viewport
|
<cdk-virtual-scroll-viewport
|
||||||
itemSize="20"
|
autosize
|
||||||
|
[minBufferPx]="200"
|
||||||
|
[maxBufferPx]="600"
|
||||||
class="bg-dark p-3 text-light font-monospace log-container"
|
class="bg-dark p-3 text-light font-monospace log-container"
|
||||||
#logContainer>
|
#logContainer>
|
||||||
@if (loading && !logFiles.length) {
|
@if (loading && !logFiles.length) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
import { ScrollingModule } from '@angular/cdk-experimental/scrolling'
|
||||||
import {
|
import {
|
||||||
|
CdkVirtualForOf,
|
||||||
CdkVirtualScrollViewport,
|
CdkVirtualScrollViewport,
|
||||||
ScrollingModule,
|
|
||||||
} from '@angular/cdk/scrolling'
|
} from '@angular/cdk/scrolling'
|
||||||
import { CommonModule } from '@angular/common'
|
import { CommonModule } from '@angular/common'
|
||||||
import {
|
import {
|
||||||
@@ -28,6 +29,7 @@ import { LoadingComponentWithPermissions } from '../../loading-component/loading
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
|
CdkVirtualForOf,
|
||||||
CdkVirtualScrollViewport,
|
CdkVirtualScrollViewport,
|
||||||
ScrollingModule,
|
ScrollingModule,
|
||||||
],
|
],
|
||||||
@@ -144,7 +146,7 @@ export class LogsComponent
|
|||||||
scrollToBottom(): void {
|
scrollToBottom(): void {
|
||||||
this.changedetectorRef.detectChanges()
|
this.changedetectorRef.detectChanges()
|
||||||
if (this.logContainer) {
|
if (this.logContainer) {
|
||||||
this.logContainer.scrollToIndex(this.logs.length - 1)
|
// this.logContainer.scrollToIndex(this.logs.length - 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user