I'm dealing with a ng-repeat that has varying heights. When I set a fixed height, everything looks fine. However, I need the parent panel's height to adjust automatically based on the ng-repeat child elements to avoid overflow issues.
Is there a way to achieve this?
Display with Fixed height (overflow at the bottom):
https://i.sstatic.net/x003C.png
Without a Fixed Height:
https://i.sstatic.net/nHjFC.png
The code for the panels:
<div class="my-panel" ng-repeat="x in month.days">
<div class="panel-today" ng-show="x.today">
TODAY
</div>
<div class="panel" ng-class="x.panel_class">
<div class="panel-heading {{x.weekend}}">{{x.day}} {{x.date | date : 'dd-MM'}}</div>
<div class="panel-body my-panel-body">
<div ng-show="x.suspension != ''" style="width: 100%; text-align: center">
<b>{{x.suspension}}</b>
</div>
<div ng-show="x.suspension == ''">
<div class="well well-sm day-well">
<div class="day_period">
<div class="pull-right">
{{x.times.day.from}}<br/>
{{x.times.day.to}}
</div>
<div class="day_head">DAY</div>
</div>
<div ng-repeat="grade in x.staff.day.m">
<div class="letterCircleM">
{{grade.code}}
</div> S SIPHO
</div>
<div ng-repeat="grade in x.staff.day.f" class="letterCircleF">
{{grade.code}}
</div>
</div>
<div class="well well-sm day-well">
<div class="day_period">
<div class="pull-right">
{{x.times.night.from}}<br/>
{{x.times.night.to}}
</div>
<div class="day_head">NIGHT</div>
</div>
<div ng-repeat="grade in x.staff.night.m">
<div class="letterCircleM">
{{grade.code}}
</div> S SIPHO
</div>
<div ng-repeat="grade in x.staff.night.f" class="letterCircleF">
{{grade.code}}
</div>
</div>
</div>
</div>
<div class="panel-footer">
<div class="panel-suspend" ng-show="x.suspension != ''">
SUSPENDED
</div>
<div ng-show="x.suspension == ''">
{{x.contract}}
</div>
</div>
</div>
</div>