Given a rowIndex, how can I determine which cells /columns are hidden with responsive plugin?

Given a rowIndex, how can I determine which cells /columns are hidden with responsive plugin?

acts7sevenacts7seven Posts: 3Questions: 2Answers: 0

What kind of function would I need / how could I form the code, so that on an outside function, I could determine which columns are hidden by datatables-responsive.js?
Given a rowIndex, how can I determine which cells /columns are hidden??

responsive: {
    details:{
        display: $.fn.dataTable.Responsive.display.childRowImmediate,
        type: '',
        target: '',
        // new $.fn.dataTable.Responsive( dt, { details: false } );
        //specify the rendering of child data row
        renderer: function ( api, rowIdx, columns){
            return getDataTableHiddenColumns( api, rowIdx, columns );
        }
    }
}

This determines the responsive: details, display, and renderer.
But how can I find an array of hidden cols for a given rowIndex

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    edited March 2018

    Hi acts7seven,

    The Responsive extension adds several API methods - one of these, columns().responsiveHidden() will give you the information you need.

    Hope that helps,

    Cheers,

    Colin

    p.s. I deleted your other post, as it was a duplicate of this one.

  • acts7sevenacts7seven Posts: 3Questions: 2Answers: 0

    Apologies for the duplicate.
    Let me play with this for a bit. It sounds like that and column().responsiveHidden() would be just what I need.
    Cheers

This discussion has been closed.