IgniteUI / igniteui-angular

Ignite UI for Angular is a complete library of Angular-native, Material-based Angular UI components with the fastest grids and charts, Pivot Grid, Dock Manager, Hierarchical Grid, and more.
https://www.infragistics.com/products/ignite-ui-angular
Other
571 stars 161 forks source link

igx-tree-grid does not expanding last row correctly if we are not setting height for grid #4697

Closed prabakaran1311 closed 5 years ago

prabakaran1311 commented 5 years ago

Description

i am using igx-tree-grid in angular 7 i am showing datas in grid rows based on screen size dynamically. if each row contains 15 records in tree grid its not showing full records in tree grid only shows part of records in grid. its not expanding fully because i am not setting grid height. i have set grid height as null because i dont want page scroll it should be dynamic.

below is the sample code

` <igx-tree-grid #grid1 [data]="allData | async" childDataKey="Properties" [width]="'100%'" [paging]="pagingEnable" [perPage]="pageSize" [allowFiltering]="true" [height]="null" [showToolbar]="true" [columnHiding]="true" [autoGenerate]="false" [toolbarTitle]="GridName" expansionDepth="0" [displayDensity]="'compact'" (onDataPreLoad)="processData($event,false)" (onSortingDone)="processData($event,true)" (onFilteringDone)="processData($event,false)" [emptyGridMessage]="gridMessageEmpty">

`

Note: I am using remote pagination, sorting and filtering.

Attachments

below screenshot i have expanded last row of the grid last row contains 10tree data but it shows only one data while expanding the grid. i need to show all the data in the treegrid. i dont want to set height for grid. if i am expanding last row it should expand the grid. expand

DiyanDimitrov commented 5 years ago

I believe this might be caused by the paging. Please note that the Tree Grid paging counts all the records on a page not only the root records. For example if perPage=10, you will see 10 records on the page no matter if they are root or child records.

prabakaran1311 commented 5 years ago

@DiyanDimitrov no if i am expanding 1st row in tree grid it shows all the records in tree. actually it having tree data while expanding it shows only one. while expanding tree grid it should expand the grid height also.

DiyanDimitrov commented 5 years ago

@prabakaran1311, I am not able to reproduce this issue. Here is a stackblitz sample which demonstrates that the grid height is increased when expanding a row https://stackblitz.com/edit/angular-7ba4ut. Could you please modify this sample or provide another one which demonstrates the issue?

prabakaran1311 commented 5 years ago

@DiyanDimitrov in the above example itself add datas in grid until full page height and expand the last row and check it not showing the last row tree grid data. below screenshot shows the issue in stackblitz igxxxx

DiyanDimitrov commented 5 years ago

@prabakaran1311, I believe this is because the div container does not show a scrollbar. I have modified the sample to enable the scrollbar, let me know if you are still experiencing the issue.

prabakaran1311 commented 5 years ago

@DiyanDimitrov its not the scrollbar issue actually its removing data from DOM itself if i am expanding last row.

DiyanDimitrov commented 5 years ago

@prabakaran1311, Could you fork my sample, modify it so that the issue is reproducible and send me the new link?

DiyanDimitrov commented 5 years ago

@prabakaran1311, Are you still experiencing this issue? If not, we could close it.