Skip to content

Commit 6985717

Browse files
authored
fix: files compact view in person card (#2597)
1 parent 7ba98e4 commit 6985717

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ registerFluentComponents(fluentProgressRing);
8080

8181
@customElement('file-list')
8282
export class MgtFileList extends MgtTemplatedComponent implements CardSection {
83-
private _isCompact = false;
83+
@state() private _isCompact = false;
8484
/**
8585
* Array of styles to apply to the element. The styles should be defined
8686
* using the `css` tag function.
@@ -554,7 +554,6 @@ export class MgtFileList extends MgtTemplatedComponent implements CardSection {
554554
*/
555555
protected clearState(): void {
556556
super.clearState();
557-
this._isCompact = false;
558557
this.files = null;
559558
}
560559

@@ -566,7 +565,6 @@ export class MgtFileList extends MgtTemplatedComponent implements CardSection {
566565
*/
567566
public asCompactView() {
568567
this._isCompact = true;
569-
this.requestUpdate();
570568
return this;
571569
}
572570

@@ -578,7 +576,6 @@ export class MgtFileList extends MgtTemplatedComponent implements CardSection {
578576
*/
579577
public asFullView() {
580578
this._isCompact = false;
581-
this.requestUpdate();
582579
return this;
583580
}
584581

0 commit comments

Comments
 (0)