Author Topic: Interaction with table in scaled container  (Read 541 times)

Igerson

  • Pro OEM
  • Newbie
  • *
  • Posts: 2
    • View Profile
Interaction with table in scaled container
« on: May 15, 2023, 04:00:25 pm »
Hi Paramvir,

I found that interacting (f.x. set cell selection) with table rendered in scaled up (190%) container produces somewhat strange results.
When I try to set selection on ceratin cells, table body rendered with offsets which makes table look broken. Another case
when I try to interact with table's scroll bar. Then table body jumps up.
JS Fiddle reproducing problem: https://jsfiddle.net/1wmbf7ts/
Here is some screenshots:
- After click on table's scrollbar
https://ibb.co/prHgLqP
- After set cell selection on bottom line, rightmost column, I think it should be not fully rendered to trigger auto scroll
https://ibb.co/fDWpFpd

I suspect it is related to table body position based on original table/cell dimensions, not scaled ones.
So, question is, how it could be fixed?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: Interaction with table in scaled container
« Reply #1 on: May 15, 2023, 06:21:06 pm »
I'm looking into it.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: Interaction with table in scaled container
« Reply #2 on: May 17, 2023, 05:42:15 pm »
Hi Igerson,

I'm sorry to say that due to inconsistencies in dimension values reported by different JS functions / properties , different browsers, and across different version of jQuery when transform is applied, transform can't be supported on the grid.

For example: getBoundingClientRect and getComputedStyle return different dimensions, jquery v3.1 and jquery v3.6 return different dimensions.

If your goal is to scale the appearance of grid, then please increase font-size, height, width of grid rather than applying transform.

Igerson

  • Pro OEM
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Interaction with table in scaled container
« Reply #3 on: May 17, 2023, 05:47:35 pm »
Hi, Paramvir

Thank you, then I'll be looking in way you suggest.

[email protected]

  • Pro OEM
  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Interaction with table in scaled container
« Reply #4 on: August 29, 2023, 03:50:21 pm »
Hi Paramvir,
We really need this fixed somehow. Are we allowed fix this our selves in the PQ code? And if so, could you give us a few hints/directions on where in the code base the problem is?
Regards Jesper

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: Interaction with table in scaled container
« Reply #5 on: August 29, 2023, 09:23:12 pm »
Hi Jesper

transform creates not one isolated but many layout problems related to key navigation, column resizing, grid maximize, etc functionality due to the aforementioned reason. So it would require changes at many places in the code.

I'm relooking into it for any viable solution.

Regards
Paramvir
« Last Edit: August 29, 2023, 10:03:23 pm by paramvir »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: Interaction with table in scaled container
« Reply #6 on: October 16, 2023, 09:03:16 pm »
Hi Team

Scaling support has been added in the upcoming version of pqgrid (9.1.0)

Please check this jsfiddle: https://jsfiddle.net/rLav8nzd/

Kindly use it with recent version of jQuery and jQueryUI for better results.
« Last Edit: October 16, 2023, 09:13:30 pm by paramvir »