Datatables/Server-side/Keys plugin hangs on 0 rows

Datatables/Server-side/Keys plugin hangs on 0 rows

ffradegradaffradegrada Posts: 10Questions: 2Answers: 0

Hi! My table is hanging with "Uncaught RangeError: Maximum call stack size exceeded" log on the Chrome console at jquery plugin.

The error is happening when the server returns 0 rows, and it is very specific. If I turn the "keys" property to "false", the table works 100% fine. But when turning to "true", hangs.

Any idea of what is going on?

Thanks!

Replies

  • ffradegradaffradegrada Posts: 10Questions: 2Answers: 0

    Actualization: after debugging some of the KeyTable plugin I found that is hanging at line 421:

    // Is the row on the current page? If not, we need to redraw to show the
            // page
            if ( pageInfo.length !== -1 && (row < pageInfo.start || row >= pageInfo.start+pageInfo.length) ) {
                this.s.focusDraw = true;
    
                dt
                    .one( 'draw', function () {
                        that.s.focusDraw = false;
                        that._focus( row, column );
                    } )
                    .page( Math.floor( row / pageInfo.length ) )
                    .draw( false );
    
                return;
            }
    

    I am using the v2.1.1 of the KeyTable plugin.

  • allanallan Posts: 63,771Questions: 1Answers: 10,510 Site admin

    Can you link to a test page showing the issue so I can debug it please?

    Allan

  • ffradegradaffradegrada Posts: 10Questions: 2Answers: 0

    Sorry Allan, it's was my error, because on a "table.cell(':eq(0)').focus();" after reloading table..

    You can dismiss this topic. Thanks for your answer!

This discussion has been closed.