Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix(chart-heatfield): Chart Heatfield is now hidden when start and en…
Browse files Browse the repository at this point in the history
…d are undefined

- Button/heatfield is now hidden if both start and end are undefined
- Added test to check for start and end being both undefined
  • Loading branch information
Sherif-Elhefnawy authored and Lukas Holzer committed Mar 9, 2020
1 parent 7dbd78a commit dbb545a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<button
class="dt-chart-heatfield-marker"
[class.dt-chart-heatfield-active]="active"
[style.visibility]="_isValidStartEndRange ? 'visible' : 'hidden'"
#marker="cdkOverlayOrigin"
cdk-overlay-origin
(click)="_toggleActive()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ describe('DtChartHeatfield', () => {
chart._afterRender.next();
validatePosition(fixture, 100, 500);
});

it('should not render heatfield when start and end are undefined ', () => {
instance.start = undefined;
instance.end = undefined;
fixture.detectChanges();
chart._afterRender.next();
expect(marker.style.visibility).toEqual('hidden');
});
});

describe('Activation', () => {
Expand Down

0 comments on commit dbb545a

Please sign in to comment.