Smart Collection UI Changes (#3332)
This commit is contained in:
parent
dcd281c5c3
commit
9e299d08b9
29 changed files with 431 additions and 189 deletions
|
@ -4,8 +4,8 @@ import {
|
|||
Component,
|
||||
ContentChild, EventEmitter,
|
||||
inject,
|
||||
Input,
|
||||
OnInit, Output,
|
||||
Input, OnChanges,
|
||||
OnInit, Output, SimpleChanges,
|
||||
TemplateRef
|
||||
} from '@angular/core';
|
||||
import {NgTemplateOutlet} from "@angular/common";
|
||||
|
@ -20,7 +20,7 @@ import {DefaultValuePipe} from "../../_pipes/default-value.pipe";
|
|||
styleUrls: ['./badge-expander.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class BadgeExpanderComponent implements OnInit {
|
||||
export class BadgeExpanderComponent implements OnInit, OnChanges {
|
||||
|
||||
private readonly cdRef = inject(ChangeDetectorRef);
|
||||
|
||||
|
@ -47,6 +47,11 @@ export class BadgeExpanderComponent implements OnInit {
|
|||
this.cdRef.markForCheck();
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
this.visibleItems = this.items.slice(0, this.itemsTillExpander);
|
||||
this.cdRef.markForCheck();
|
||||
}
|
||||
|
||||
toggleVisible() {
|
||||
this.toggle.emit();
|
||||
if (!this.allowToggle) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue