-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ngrid): allow minimum height based on row count
BREAKING CHANGES: `PblNgridComponent.fallbackMinHeight` is now deprecated and will be removed in the next major version (4.0.0), use `PblNgridComponent.minDataViewHeight` instead The UI layout has changed when virtual scroll is disabled (`vScrollNone`). Previously, the layout was inconsistent, creating different behviour when vScroll was disabled. The fixed metadata rows were set within the container and the data viewport had no scrollbar. This is now changed and it will behave exactly the same in both modes.
- Loading branch information
1 parent
b488d91
commit 296fe5d
Showing
25 changed files
with
223 additions
and
130 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
apps/libs/app-content-chunks/columns/columns-content.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/ngrid-demo-app/content/concepts/columns/column-model/simple-model.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<pbl-ngrid style="height: 110px" [dataSource]="dsSimpleModel" [columns]="columnsSimpleModel"></pbl-ngrid> | ||
<pbl-ngrid [dataSource]="dsSimpleModel" [columns]="columnsSimpleModel" [minDataViewHeight]="-1"></pbl-ngrid> |
2 changes: 1 addition & 1 deletion
2
apps/ngrid-demo-app/content/concepts/columns/factory/factory.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<pbl-ngrid [dataSource]="ds" [columns]="columns" fallbackMinHeight="150"></pbl-ngrid> | ||
<pbl-ngrid [dataSource]="ds" [columns]="columns" minDataViewHeight="-5"></pbl-ngrid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...emo-app/content/concepts/datasource/introduction/simple-model/simple-model.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<pbl-ngrid style="height: 500px" [dataSource]="ds" [columns]="columns"></pbl-ngrid> | ||
<pbl-ngrid [dataSource]="ds" [columns]="columns" minDataViewHeight="-1"></pbl-ngrid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 21 additions & 6 deletions
27
...emo-app/content/concepts/grid/height-and-scrolling/grid-height/grid-height.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
<div fxLayout="row" fxLayoutGap="16px" style="width: 100%; padding: 16px"> | ||
<mat-checkbox [checked]="explicitGridHeight" (change)="explicitGridHeight = $event.checked">Explicit grid height</mat-checkbox> | ||
<mat-checkbox [checked]="fallbackMinHeight" (change)="fallbackMinHeight = $event.checked">Set fallbackMinHeight to 150</mat-checkbox> | ||
<mat-checkbox [checked]="vScroll" (change)="vScroll = $event.checked">Virtual Scroll Enabled</mat-checkbox> | ||
<mat-form-field appearance="legacy"> | ||
<mat-label>Set Explicit Grid Height</mat-label> | ||
<mat-select [value]="explicitGridHeight" (selectionChange)="explicitGridHeight = $event.value"> | ||
<mat-option value="300">300 Pixels</mat-option> | ||
<mat-option value="500">500 Pixels</mat-option> | ||
<mat-option value="750">750 Pixels</mat-option> | ||
<mat-option value="">None</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
<mat-form-field appearance="legacy"> | ||
<mat-label>Set minDataViewHeight</mat-label> | ||
<mat-select [value]="minDataViewHeight" (selectionChange)="minDataViewHeight = $event.value"> | ||
<mat-option value="150">150 Pixels</mat-option> | ||
<mat-option value="-3">3 Rows</mat-option> | ||
<mat-option value="-10">10 Rows</mat-option> | ||
<mat-option value="0">None</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
|
||
<div fxFlex="*"></div> | ||
<button fxFlex="noshrink" mat-flat-button (click)="redraw()">Redraw</button> | ||
</div> | ||
<div *ngIf="settings" [class.table-height-300]="settings.explicitGridHeight"> | ||
<pbl-ngrid *ngIf="settings.vScroll" [dataSource]="ds" [columns]="columns" [fallbackMinHeight]="settings.fallbackMinHeight" vScrollAuto></pbl-ngrid> | ||
<pbl-ngrid *ngIf="!settings.vScroll" [dataSource]="ds" [columns]="columns" [fallbackMinHeight]="settings.fallbackMinHeight" vScrollNone></pbl-ngrid> | ||
<div *ngIf="settings"> | ||
<pbl-ngrid [dataSource]="ds" [columns]="columns" [minDataViewHeight]="settings.minDataViewHeight" [style.height]="settings.explicitGridHeight" vScrollAuto></pbl-ngrid> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...app/content/features/built-in-plugins/target-events/enter-and-leave-events.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<pbl-ngrid blockUi [dataSource]="ds" [columns]="columns" vScrollNone showFooter class="pbl-ngrid-cell-ellipsis enter-and-leave-grid-example " | ||
<pbl-ngrid blockUi [dataSource]="ds" [columns]="columns" vScrollNone showFooter [minDataViewHeight]="-5" class="pbl-ngrid-cell-ellipsis enter-and-leave-grid-example " | ||
(cellEnter)="onEnterLeaveEvents($event, true)" (cellLeave)="onEnterLeaveEvents($event)" | ||
(rowEnter)="onEnterLeaveEvents($event, true)" (rowLeave)="onEnterLeaveEvents($event)"></pbl-ngrid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...id-demo-app/content/features/column/column-group/multi-header-column-group.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<pbl-ngrid [dataSource]="ds" [columns]="columns"></pbl-ngrid> | ||
<pbl-ngrid [dataSource]="ds" [columns]="columns" [minDataViewHeight]="-5"></pbl-ngrid> |
2 changes: 1 addition & 1 deletion
2
apps/ngrid-demo-app/content/features/grid/row-ordering/row-ordering.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<pbl-ngrid rowReorder vScrollNone fallbackMinHeight="150" | ||
<pbl-ngrid rowReorder vScrollNone minDataViewHeight="150" | ||
[dataSource]="ds" [columns]="columns"></pbl-ngrid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Refactor Items | ||
|
||
## [1] Add support in the RowApi to find rows/cells based on various inputs | ||
|
||
- Input of an HTML element to get a row or a cell. | ||
- Input of row ident to get row or row ident + column id to get cell | ||
|
||
We then refactor **target-events** to use this API. | ||
|
||
Search for this reference in the code to see where refactor is needed |
Oops, something went wrong.