diff --git a/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.ts b/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.ts index ffea85e..d0a993f 100644 --- a/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.ts +++ b/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.ts @@ -18,23 +18,25 @@ import { DatasetDistribution } from 'geonetwork-ui/libs/common/domain/src/lib/mo export class DatasetVisualisationComponent { @Input() displayMap: boolean @Input() displayData: boolean - selectedView = 'map' + selectedView: string selectedLink$ = new BehaviorSubject(null) - constructor(public mdViewFacade: MdViewFacade) {} + constructor(public mdViewFacade: MdViewFacade) { + this.selectedView = this.displayMap ? 'map' : 'table' + } onTabIndexChange(index: number): void { let view switch (index) { - case 0: - view = 'map' - break case 1: view = 'table' break - default: + case 2: view = 'chart' + break + default: + view = 'map' } this.selectedView = view setTimeout(() => { diff --git a/resources/styles.css b/resources/styles.css index ba17010..9f803a4 100644 --- a/resources/styles.css +++ b/resources/styles.css @@ -179,7 +179,7 @@ input[type='checkbox'] { .mat-mdc-tab:not(.mdc-tab--stacked) { @apply h-9 !important; } - +/* TO REMOVE once the component is extended */ gn-ui-copy-text-button div input { @apply bg-white rounded-l !important; }