Author Topic: Error while onWindowResize() event  (Read 1824 times)

cho

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 2
    • View Profile
Error while onWindowResize() event
« on: August 10, 2018, 05:26:14 pm »
pqgrid.min.js:11 Uncaught TypeError: Cannot read property 'wdCenter' of undefined
    at pq.cRenderBody.refreshColumnWidths (pqgrid.min.js:11)
    at pq.cRenderBody.init (pqgrid.min.js:17)
    at t.paramquery.cRefresh.refresh (pqgrid.min.js:12)
    at pqgrid.min.js:12
    at pqgrid.min.js:12



      function addtab(){
        var now = new Date();
        var y = now.getFullYear();
        var m = now.getMonth() + 1;
        var d = now.getDate();
        var w = now.getDay();
        var h = now.getHours();
        var mi = now.getMinutes();
        var s = now.getSeconds();
        var a = Math.floor( Math.random() * 11 ) ;
        var tabname = w + "" + h + "" + mi + "" + s + "" + a;

        $( "<li class='tab" + tabname + "'><a href='#tabs-" + tabname + "'>New Tab" + tabname + "</a></li>" )
         .appendTo( "#tabs .ui-tabs-nav" );
        $( "<div id='tabs-" + tabname + "'><div id='grid_editing-" + tabname + "' style='margin: auto;'></div></div>" )
         .appendTo( "#tabs" );
        $( "#tabs" ).tabs( "refresh" );
        pq.grid( "#grid_editing-" + tabname,  []);
      }

      $(function () {
        $("#tabs").tabs();
        setTimeout( function(){
        addtab();
        }, 2000 );
      });


<div id="tabs">
<ul>
<li><a href="#tabs-1">tab1</a></li>
</ul>
<div id="tabs-1"></div>
</div>

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Error while onWindowResize() event
« Reply #1 on: August 13, 2018, 09:27:29 am »
Could you please share a jsfiddle so that I can find exact reason of error.

However there is a known issue in onWindowResize ( v5.1.0) which has been fixed in v5.2.0