Clientside Callbacks for DataTables

Hi, this is more of a general question than one with a specific example. Might be a stupid one, but I will ask it anyways…

I’ve been getting the hang of clientside callbacks with graphs, but there is a large portion of my dashboard(s) that are made up of data tables.

Do clienside callbacks apply to Dash DataTables? If so, how does this work with the Javascript code required in clientside callbacks.

Thank you very much for any response here.

1 Like

FYI - solution looks like this in js…

app.clientside_callback(

"""

function(figure_data) {

    if(figure_data === undefined) {

        return {'data': [], 'layout': {}};

    }

    const fig = Object.assign({}, figure_data, {

            'layout': {

                ...figure_data.layout

            }

    });

    return fig;

}

""",

Output('plyr2_careerTbl', 'children'),

Input('cs_plyr2Career', 'data')

)