Skip to content
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

[ANGULAR] Bug : Wrong size of the grid after hiding child column #3514

Open
matsbryntse opened this issue Oct 6, 2021 · 1 comment
Open
Labels
bug Something isn't working forum Issues from forum

Comments

@matsbryntse
Copy link
Member

Forum post

Hello again,

You can reproduce the bug here https://bryntum.com/examples/grid/groupedheaders/. If you hide a child column in a grid with a horyzontal scroll (you can resize the columns to have the horyzontal scroll), the grid will be too wide of the size of the hidden column :

screenshot.png

Regards,
Artbil
screenshot.png
Screenshot 2021-10-06 at 17 17 11

@matsbryntse matsbryntse added bug Something isn't working forum Issues from forum labels Oct 6, 2021
@ExtAnimal
Copy link

ExtAnimal commented Oct 16, 2021

There are two issues at work here.

What you see in the final image is that the "Food" header has been reduced to its minWidth which is defined in our code as 60:

            /**
             * Column minimal width. If value is Number then minimal width is in pixels
             * @config {Number|String} minWidth
             * @default 60
             * @category Layout
             */
            { name : 'minWidth', defaultValue : 60 },

I suggest that for grouped headers, they set their own minWidth to childCount * 60, or better, the sum of the minWidths of the children so that the children do not get crushed so small. Other than that, it's just what is confgured - the column is shrunk.

The other issue is that of flexed columns inside a grouped header. They are flexing inside the width of its owning group header. But we copy its flex value into its cells below, and they flex inside the width of the whole grid.

This second issue is fixed by https://github.com/bryntum/bryntum-suite/pull/3840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum
Projects
None yet
Development

No branches or pull requests

2 participants