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

Auto width *reduction* of grid not working if Paramquery grid is inside a table cell #177

Open
jensb opened this issue Mar 4, 2022 · 4 comments

Comments

@jensb
Copy link

jensb commented Mar 4, 2022

See here for a demo: https://jsfiddle.net/75u6r1x8/

Change the width of the Paramquery viewport.
If it's enlarged, Paramquery adjusts its width.
But if it's reduced, the Paramquery grid is not reduced accordingly.

I would expect Paramquery to reduce its width accordingly for the table to stay at a total of 100% width (as specified).
If I use floating DIVs instead of a table, autoadjustment works in both directions.

Strangely, when entering fullscreen mode, the width is correctly calculated - AND, when restoring from fullscreen, the width of the Paramquery Grid is reduced to the full width of the viewport, but without respecting the other table columns' widths.

@paramquery
Copy link
Owner

paramquery commented Mar 7, 2022

That looks like a chicken and egg situation: td width dependent upon grid width and grid width dependent upon td width.

td needs to have well defined width in order for your example to work correctly.

td style='width:80%;'

Check this https://jsfiddle.net/409thuc5/

@jensb
Copy link
Author

jensb commented Mar 7, 2022

If this were the case, why does Paramquery automatically expand in my example? If it can expand (i.e. calculate a new width after the viewport has changed), it should be able to reduce as well, shouldn't it? There is no circular dependency (as far as I can see).

My specific issue is that we need to use a table layout like here: https://jsfiddle.net/pqxk2c5s/ to make the colResizable plugin work for our layout, and width reduction does not work there, although width expansion does.

Can we fix this somehow?

@paramquery
Copy link
Owner

paramquery commented Apr 2, 2022

Version 8.3.0 has improved reactivity and fixes this issue.

https://jsfiddle.net/hwv2m4cr/1/

@jensb
Copy link
Author

jensb commented Apr 2, 2022

Thank you !!! :-)
Will test it on our systems and give feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants