-
Notifications
You must be signed in to change notification settings - Fork 157
fix(igxGrid): Grid should render all columns when grid width is set to null. #5397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
02fd506 to
667e7e0
Compare
…at change the total grid width (row selectors, expansion indicators etc.).
|
When setting igx-grid's width property to null, space is being added. That bug doesn't persist below 8.0.x and in case width is set to a value, for instance 100%, as well. |
…nto account when calculating virtualization width as it should be equal to the sum of column widths.
|
@3phase Please re-test. |
|
The bug persists on versions 8.0.x and above. |
…n width is set to null.
|
@3phase Please re-test again :) |
3phase
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works now 👀
…dings so that grid will expact based on content. In case width is null and column width in % then set width to min width explicitly.
Are you perhaps setting "null" as string and not as a value, for example width='null'? Please note that in that case the resolved value will be string and we do no have explicit covertion for such scenarios.
|
|
Agree about 1. - probably didn't box the width input. <igx-grid #grid1 [data]="remote | async" [primaryKey]="'ProductID'"
[rowSelectable]="selection" (onSelection)="handleRowSelection($event)"
[width]="null" [height]="'600px'">
<igx-column [field]="'ProductID'" [editable]="true" [width]="'80%'"></igx-column>
<igx-column [field]="'ProductName'"></igx-column>
<igx-column [field]="'UnitsInStock'"></igx-column>
</igx-grid><div class="sample-content">
<div class="sample-column">
<igx-grid [allowFiltering]="true" [data]="data" [autoGenerate]="false" displayDensity="comfortable" [width]="null" height="600px" [paging]="true" [perPage]="10">
<igx-column field="ProductName" [pinned]="true" [movable]="true" header="Product Name" width="19%" [dataType]="'string'" [sortable]="true" [hasSummary]="false" [editable]="true" [filterable]="true" [resizable]="true">
</igx-column>
<igx-column field="UnitsInStock" [pinned]="false" [movable]="true" header="Units In Stock" width="19%" [dataType]="'number'" [sortable]="true" [hasSummary]="false" [editable]="true" [filterable]="true" [resizable]="true">
</igx-column>
<igx-column field="OrderDate" [movable]="true" header="Order Date" width="19%" [dataType]="'date'" [sortable]="true" [hasSummary]="false" [editable]="true" [filterable]="true" [resizable]="true">
<ng-template igxCell let-cell="cell" let-val>
{{val | date:'dd/MM/yyyy'}}
</ng-template>
</igx-column>
<igx-column field="Discontinued" [movable]="true" [resizable]="true" header="Discontinued" width="15%" [dataType]="'boolean'" [sortable]="false" [hasSummary]="false" [editable]="true" [filterable]="false" [resizable]="true">
</igx-column>
<igx-column field="ReorderLevel" header="Reorder Level" [movable]="true" [resizable]="true" [dataType]="'number'" width="19%" [sortable]="false" [hasSummary]="false" [editable]="true" >
<ng-template igxCellEditor let-cell="cell">
<input type="number" [(ngModel)]="cell.value" style="color: black"/>
</ng-template>
</igx-column>
</igx-grid>
</div>
</div> |
…o that all option changes are applied.


Closes #5288
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes