Skip to content
Snippets Groups Projects
Commit 2c7ebd77 authored by Mohammad Alayoub's avatar Mohammad Alayoub
Browse files

fixed collapse the question after closing the panel

parent 2d341fc1
No related merge requests found
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
<!-- <button mat-menu-item (click)="sortScore(true)" aria-labelledby="sort-lbl-rating">{{'question-wall.sort-score' | translate}}</button> --> <!-- <button mat-menu-item (click)="sortScore(true)" aria-labelledby="sort-lbl-rating">{{'question-wall.sort-score' | translate}}</button> -->
</mat-menu> </mat-menu>
<mat-accordion> <mat-accordion>
<mat-expansion-panel *ngFor="let keyword of keywords"> <mat-expansion-panel (opened)="panelOpenState = true"
(closed)="panelOpenState = false"
*ngFor="let keyword of keywords">
<mat-expansion-panel-header class="color"> <mat-expansion-panel-header class="color">
<mat-panel-title [ngClass]="{'edit-keyword': editedKeyword}"> <mat-panel-title [ngClass]="{'edit-keyword': editedKeyword}">
{{keyword.keyword}} {{keyword.keyword}}
...@@ -35,6 +37,7 @@ ...@@ -35,6 +37,7 @@
<app-topic-dialog-comment <app-topic-dialog-comment
[question]="question" [question]="question"
[maxShowedCharachters] = "140" [maxShowedCharachters] = "140"
[isCollapsed] = "!panelOpenState"
></app-topic-dialog-comment> ></app-topic-dialog-comment>
<!--<p [ngClass]="{'hideText': question.length > maxShowedCharachters || isReadMore}"> <!--<p [ngClass]="{'hideText': question.length > maxShowedCharachters || isReadMore}">
{{(question.length < maxShowedCharachters || isReadMore) ? question : question | slice:0:70}} {{(question.length < maxShowedCharachters || isReadMore) ? question : question | slice:0:70}}
......
...@@ -9,10 +9,9 @@ export class TopicDialogCommentComponent implements OnInit { ...@@ -9,10 +9,9 @@ export class TopicDialogCommentComponent implements OnInit {
@Input() question: string; @Input() question: string;
@Input() maxShowedCharachters: number; @Input() maxShowedCharachters: number;
isCollapsed: boolean = false; @Input() isCollapsed: boolean = false;
constructor() { } constructor() { }
ngOnInit(): void { ngOnInit(): void {
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment