Skip to content

Commit

Permalink
fix: fix the misbehavior on absent maps + changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoinier committed Jul 15, 2024
1 parent 0249b9f commit 8e7eafd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<DatasetDistribution>(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(() => {
Expand Down
2 changes: 1 addition & 1 deletion resources/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8e7eafd

Please sign in to comment.