-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
sizeColumnsToFit all the time #860
Comments
i think that's to specific to be included in the grid, at least in the medium term! if you want to try something yourself, start with listening for the columnResized events. doing your own implementation would be easier, as then you won't have to worry about items not relevant to you, eg if your not using column grouping, you don't need to consider it, or if you are, your solution can assume grouping and ignore when not. |
Yes! This is a really nice request and it is not easy to be implemented. |
I would also like this ability. @ceolter, your suggestion to use columnResized event doesn't work because calling sizeColumnsToFit() in response to that triggers another columnResized event, creating an infinite loop. I don't understand dennisteo's suggestion of using setTimeout - wouldn't that still make an infinite loop, just a slightly slower one? It's seems like the only way to do this would be to create a columnResized event that is only fired for manual resizes (user initiated). I don't need an event to be fired to let me know I called sizeColumnsToFit(). :) Alternatively sizeColumnsToFit() could have a stopPropagation parameter added. |
@ceolter |
I met the same issue and found a solution by using the if (event.source === 'uiColumnDragged') {
// Call sizeColumnsToFit
} |
Thanks for AMAZING job!
I what to be able to resize the columns in a way that the sum of all columns' width would be grid width all the time. For example if I make a column bigger it would make another column smaller to fit them all in grid width.
Is it possible? If yes, how?
I would appreciate any help.
The text was updated successfully, but these errors were encountered: