Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82794

Parent in button config

$
0
0

I have two button groupss, one in top2State (named 'filter-main') and another in top1Start (named 'filter-locations').

I'm looking for each button in the group to refer to its parent group under the buttons.buttons.action method and thought the config parameter might have it.

I did in fact find a parent property, but it seems it's always undefined.

Am I looking in the proper place, and should it be undefined?

Layout:

console.log(config):

Pseudocode:

layout: {
    top2Start: {
        buttons: {

            name: 'filter-main',

            buttons: [
                { ... other buttons ... },
                {
                    name: 'location',
                    text: 'By location',

                    action: function ( e, dt, node, config, cb ) {

console.log(config)

                    }
                },
                { ... other buttons ... }
            ]
        }
    },
    top1Start: {
        buttons: {

            name: 'filter-locations',

            buttons: [
                { ... other buttons ... },
                {
                    name: 'State',
                    text: 'State',

                    action: function ( e, dt, node, config, cb ) {

console.log(config)

                    }
                },
                { ... other buttons ... }
            ]
        }
    }
},

Viewing all articles
Browse latest Browse all 82794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>