Author Topic: Horizontal Scrollbar Doesn't Adjust for Changing Viewport Width  (Read 2615 times)

arky

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 14
    • View Profile
Horizontal Scrollbar Doesn't Adjust for Changing Viewport Width
« on: September 13, 2017, 09:24:01 pm »
v4.0.1

If I create a table i Flex mode it will create for the current screen size with Horizontal scroll if wider than screen.
If you then change the viewport width the scrollbar doesn't necessarily adjust to fit. If you change to wider the scroll increases to match. If you change to narrower the scroll does not adjust and you loose the right scroll arrow.
If the screen was initially wide enough to not require a scroll and you narrow it, the scroll does not appear and you can't access the right side of the table.

Real use case like when using a tablet and you change between landscape and portrait and vice a versa.

Setup is

         height: 'flex',
         width: 'flex',
         flex:{on: true},
         maxWidth: '100%',

And event handler as per your demo

      pq.grid("#grid", obj)
      .on("refresh refreshCell", function (evt, ui) {
         if (ui.source != 'flex') {
            this.flex();
         }
      });










paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6298
    • View Profile
Re: Horizontal Scrollbar Doesn't Adjust for Changing Viewport Width
« Reply #1 on: September 13, 2017, 10:11:40 pm »
I'm able to reproduce the issue, moving it to bug report board and would let you know once the fix is available.

arky

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Horizontal Scrollbar Doesn't Adjust for Changing Viewport Width
« Reply #2 on: September 14, 2017, 04:19:29 am »
A bit more of a probably related problem.

If you have a table setup as above so that it needs to scroll horizontally and the column on the right edge is barely showing, like:



If you click the header of the partially hidden column to sort it, the change in focus pulls the header over to display all of it but it leaves the columns below behind.