Skip to content

Commit

Permalink
fix: splitter max height (#2398)
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-bassett authored Sep 15, 2023
1 parent 977f1c8 commit ca2a8f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/components/src/splitter/splitter.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { SplitterCellDimension, SplitterContentDirective } from './splitter-cont
class="splitter-content"
[ngStyle]="{
flex: this.buildFlex | htMemoize: content.dimension.value,
maxHeight: this.buildMaxHeight | htMemoize: content.dimension.value
}"
>
<ng-container *ngTemplateOutlet="content.templateRef"></ng-container>
Expand Down Expand Up @@ -243,6 +244,8 @@ export class SplitterComponent implements OnChanges, AfterContentInit {
}

protected readonly buildFlex = (pixels: number): string => `1 1 ${pixels}px`;

protected readonly buildMaxHeight = (pixels: number): string => (this.isHorizontal() ? '' : `${pixels}px`);
}

interface NormalizationParameters {
Expand Down

0 comments on commit ca2a8f9

Please sign in to comment.