Author Topic: undefined variable error in $.paramquery.cRefresh.onWindowResize  (Read 4774 times)

CFGLife

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 6
    • View Profile
undefined variable error in $.paramquery.cRefresh.onWindowResize
« on: February 28, 2018, 06:38:44 am »
in Pro version 5.1.0
Whenever I resize the page and the grid is resized I am getting the following error:

Uncaught ReferenceError: o is not defined
    at $.paramquery.cRefresh.onWindowResize (pqgrid.dev.js:7369)
    at dispatch (jquery-3.3.1.js:5183)
    at elemData.handle (jquery-3.3.1.js:4991)

Looking at the code I do not see any definition of o being set

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: undefined variable error in $.paramquery.cRefresh.onWindowResize
« Reply #1 on: February 28, 2018, 04:45:58 pm »
Could you please share a jsfiddle.

CFGLife

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: undefined variable error in $.paramquery.cRefresh.onWindowResize
« Reply #2 on: February 28, 2018, 07:15:08 pm »
OK it will take a little time to get this broken down into its essences to put in a Fiddle will post it when I have it set up.

Thank you

CFGLife

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: undefined variable error in $.paramquery.cRefresh.onWindowResize
« Reply #3 on: March 01, 2018, 08:02:02 am »
OK here is a jsfiddle:
https://jsfiddle.net/cqkaw0kh/6/

I did this in FF but I believe you should see the same thing in Chrome.  If you open the browser's development tools then resize the window you will see the ReferenceError: o is not defined
[Learn More]
pqgrid.min.js:12:6000

error

And especially if you change the height it doesn't resize correctly.

I did find while building the fiddle that if I leave out the   pqselect.dev.js file then the error does not occur and it works better but it sill does not resize correctly when changing the height of the window

Thank you for your help

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: undefined variable error in $.paramquery.cRefresh.onWindowResize
« Reply #4 on: March 01, 2018, 05:46:49 pm »
I couldn't see the error either in Chrome or FF on resize of browser window.

I noticed that you have added width, flex styles in the grid css which grid doesn't support.

To add, % width, height, you would have to add them to the grid options height, width, maxWidth, maxHeight, etc.

https://paramquery.com/pro/api#option-height

CFGLife

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: undefined variable error in $.paramquery.cRefresh.onWindowResize
« Reply #5 on: March 01, 2018, 07:20:56 pm »
Thanks for thew feedback

I think I figured out the variable here.  I thought I was going crazy this use to work and then suddenly didn't.  The one difference is I just got a new system and am now on Widows 10.  When I look at the fiddle on a Windows 7 system I do not see the error either and it works correctly but on my new windows 10 machine I get the problem.  This is very strange.

If you tested on other than a windows 10 do you have the ability to test on that platform? for nothing else than to prove or disprove my theory.

Thank you for your help

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: undefined variable error in $.paramquery.cRefresh.onWindowResize
« Reply #6 on: March 12, 2018, 10:23:04 am »
I couldn't find error in Win 10 also.

Do you have any more details.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: undefined variable error in $.paramquery.cRefresh.onWindowResize
« Reply #7 on: May 29, 2018, 11:00:38 pm »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: undefined variable error in $.paramquery.cRefresh.onWindowResize
« Reply #8 on: July 24, 2018, 11:13:01 am »
Thanks for reporting issue, this is fixed in v5.2.0