-
Notifications
You must be signed in to change notification settings - Fork 27
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
Column widths incorrectly calculated based on previous rowData when using autoSize in AgGrid #318
Comments
Hello @petar-qb, This probably works in a previous version, however, in the AG Grid update between these two versions, the However, it is important to note that in dash, you are not removing the component and causing it to be fresh, you are essentially updating the component, which means the grid is already initialized, therefore triggering the columnSize when updated. Here is a way to update it with adjusting the id and you get the expected behavior:
or you can use a chained callback:
|
Description
I'm using AgGrid component with
columnSize="autoSize"
configuration.When the data filter value is changed, the grid column widths are calculated based on the previous instead on the latest
rowData
.It seems like the
DashAgGrid.updateColumnWidths()
(and the innergridApi.autoSizeAllColumns(skipHeader)
) are called before the most recentrowData
is set.Expected behavior would be that the column widths are always aligned with the latest
rowData
.How to Reproduce
Package version:
dash-ag-grid==31.2.0
After running the code below, adjust the range slide filter as it's showed in the screen recoding (video below the code section):
columSizeBug.mov
The text was updated successfully, but these errors were encountered: