Skip to content

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

Open

Description

@jensb

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.

Activity

  1. paramquery commented on Mar 7, 2022

    @paramquery
    Owner

    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/

  2. jensb commented on Mar 7, 2022

    @jensb
    Author

    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?

  3. paramquery commented on Apr 2, 2022

    @paramquery
    Owner

    Version 8.3.0 has improved reactivity and fixes this issue.

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

  4. jensb commented on Apr 2, 2022

    @jensb
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions