You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getColAutosizeWidth() function sets autoSize.colValueArray in certain cases.
Then getColContentSize() is called. This coerces autoSize.colValueArray to be of type RowInfo in the call to getColWidth.
That coercion means no fields are in common, and nothing is measured. A work around is to replace
if(autoSize.colValueArray){// if an array of values are specified, just pass them in instead of datamaxColWidth=this.getColWidth(columnDef,gridCanvas,autoSize.colValueArrayasany);returnMath.max(autoSize.headerWidthPx,maxColWidth);}
with
if(autoSize.colValueArray){// if an array of values are specified, just pass them in instead of dataconstrowInfo={}asRowInfo;rowInfo.startIndex=0;rowInfo.endIndex=autoSize.colValueArray.length-1;rowInfo.valueArr=autoSize.colValueArray;maxColWidth=this.getColWidth(columnDef,gridCanvas,rowInfo);returnMath.max(autoSize.headerWidthPx,maxColWidth);}
I use the ability to specify my own value for measuring a column based on colValueArray to get around the inefficiencies inherent in the current implementation of GridAutosizeColsMode.IgnoreViewport.
The text was updated successfully, but these errors were encountered:
Will have a look at this soon, it's my code. I note I have been meaning to update it for a while, I have my own offline branch and I've fixed a lot of bugs and made a few enhancements over the last 12 months.
Just a comment - I got back to this and had a look, but this is a Typescript issue. I'm still pretty sketchy on typescript, so I think if you want assistance it will have to wait a few more months until I do my first major Typescript conversion. Then I'll be up with it - at this point, I'd basically just be guessing.
Also, I have uncovered some subtle bugs in the autosize code. It's tricky, because a lot of the autosizing is bound up with what type of editor and formatter is being used in the column and how they behave, and that's often quite complex and completely external to the concerns of the grid. I'm still working that out in my own libraries. TBH a few times I've almost decided to scrap it and go back to a really simple algorithm, and instead provide the ability for the user to set and persist as default the column widths. Having gone this far, I will persist (even if I don't end up using it!), but it will take some hard decisions.
The getColAutosizeWidth() function sets autoSize.colValueArray in certain cases.
Then getColContentSize() is called. This coerces autoSize.colValueArray to be of type RowInfo in the call to getColWidth.
That coercion means no fields are in common, and nothing is measured. A work around is to replace
with
I use the ability to specify my own value for measuring a column based on colValueArray to get around the inefficiencies inherent in the current implementation of GridAutosizeColsMode.IgnoreViewport.
The text was updated successfully, but these errors were encountered: