Control initial open state of Tabulator groups

Is there a way to set the initial open state of the Panel Tabulator groups? Usually they are all open.

from bokeh.sampledata.autompg import autompg
pn.widgets.Tabulator(autompg, groupby=['yr', 'origin'], 
                     height=240)

Is the Python Panel Tabulator widget based on this JavaScript element? Because there the option exits.

Grouping Data | Tabulator

I figured it out. There is an option called configuration. According to the documentation what it does is:

configuration (dict): A dictionary mapping used to specify Tabulator options not explicitly exposed by Panel.

So i just tried using the name of the option described on the JavaScript Tabulator element documentation page and it worked! The groups are all closed now. :slightly_smiling_face: Fascinating.

pn.widgets.Tabulator(autompg, groupby=['yr', 'origin'], 
                     configuration={'groupStartOpen':False},
                     height=240)

1 Like