Skip to content

Commit

Permalink
feat(list-view): Create boolean flag to enable/disable the view switc…
Browse files Browse the repository at this point in the history
…her (#294)

Co-authored-by: flaurens <flavie.laurens@unibas.ch>
  • Loading branch information
flavens and flaurens committed May 7, 2021
1 parent 523af24 commit 2053020
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
@@ -1,6 +1,6 @@
<!-- header / toolbar to select view and pagination -->
<div class="list-view-header">
<span class="switch-list">
<span *ngIf="displayViewSwitch" class="switch-list">
<span class="switch-list-label">Display as&nbsp;</span>
<button mat-button (click)="toggleView('list')" [class.active]="view === 'list'">
<mat-icon>view_list</mat-icon> List
Expand Down
Expand Up @@ -33,6 +33,8 @@ export class ListViewComponent implements OnChanges {

@Input() view?: 'list' | 'grid' = 'list'; // TODO: will be expanded with 'table' as soon as resource-table component is done

@Input() displayViewSwitch?: boolean = true;

/**
* Click on an item will emit the resource iri
*
Expand Down

0 comments on commit 2053020

Please sign in to comment.