How to set maximun number of columns to appear at same time?

Hello @abdoo,

Yes, can hide columns, via css.

Or you can do as you suggested have a dropdown that has all the column options available, with multi select and use that to build your table.

@app.callback(
Output('myTable','data'),
Output('myTable','columns'),
Input('myDropdown','value')
)
def showColumns(v):
     if v:
          return df[v].to_dict('records'), [{'name':i}, 'id':i} for i in v]

Something like this might be able to work.

If not, you can check out this for css and javascript tricks to expand the data:

1 Like