mirror of
https://github.com/bitgapp/eqMac.git
synced 2024-11-22 13:07:26 +03:00
added virtual scroll to select box to handle large amount of items
This commit is contained in:
parent
4bd4a27b31
commit
1e1e714aab
@ -1,5 +1,7 @@
|
||||
<eqm-container class="container" #container>
|
||||
<div *ngFor="let item of items" [class]="'item' + (item == selectedItem ? ' selected' : '')" (click)="selectItem(item)" [style.height.px]="itemHeight - 6">
|
||||
<eqm-container class="container" #container>
|
||||
<cdk-virtual-scroll-viewport [itemSize]="itemHeight" style="height: 100%; width: 100%" >
|
||||
<div *cdkVirtualFor="let item of items" [class]="'item' + (item == selectedItem ? ' selected' : '')" (click)="selectItem(item)" [style.height.px]="itemHeight - 6">
|
||||
<eqm-icon *ngIf="item.icon" [name]="item.icon" class="icon"></eqm-icon><eqm-label>{{item[labelParam]}}</eqm-label>
|
||||
</div>
|
||||
</eqm-container>
|
||||
</cdk-virtual-scroll-viewport>
|
||||
</eqm-container>
|
||||
|
@ -46,6 +46,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
|
||||
import { CarouselComponent, CarouselItemDirective, CarouselItemElement } from './components/carousel/carousel.component'
|
||||
import { QuestionComponent } from './components/question/question.component'
|
||||
import { ClickedOutsideDirective } from './directives/clicked-outside.directive'
|
||||
import { ScrollingModule } from '@angular/cdk/scrolling'
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -53,7 +54,8 @@ import { ClickedOutsideDirective } from './directives/clicked-outside.directive'
|
||||
FormsModule,
|
||||
HttpClientModule,
|
||||
PipesModule,
|
||||
BrowserAnimationsModule
|
||||
BrowserAnimationsModule,
|
||||
ScrollingModule
|
||||
],
|
||||
declarations: [
|
||||
ClickedOutsideDirective,
|
||||
|
Loading…
Reference in New Issue
Block a user