Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Double Scrollbar bug #362

@danielgut10

Description

@danielgut10

For some reason, I am getting a double scrollbar in my dash tables (look at attached screenshot). The inner scroll bar works perfectly, as it enables me to scroll up/down through the table I plotted. But the outer scrollbar is absolutely useless, and it looks ugly. I want to remove the outer scrollbar ONLY.

I have tried everything, and pretty much searched everywhere. The only way to remove the outer scrollbar is by deleting "overflowY" key in the style_table parameter in the dash_table.Datatable() object. However, this removes the inner one too, and it makes my table super long, which makes my dash web app look bad. Does anyone know how to fix this problem?

Thanks!

Double scroll bar image:
image

Double scrollbar in Dash Tables
Daniel · 4 minutes ago
Hello! First of all, thank you for an excellent course. I learned a lot.

For some reason, I am getting a double scrollbar in my dash tables (look at attached screenshot). The inner scroll bar works perfectly, as it enables me to scroll up/down through the table I plotted. But the outer scrollbar is absolutely useless, and it looks ugly. I want to remove the outer scrollbar ONLY.

I have tried everything, and pretty much searched everywhere. The only way to remove the outer scrollbar is by deleting "overflowY" key in the style_table parameter in the dash_table.Datatable() object. However, this removes the inner one too, and it makes my table super long, which makes my dash web app look bad. Does anyone know how to fix this problem?

Thanks!

Here is my code for that:

html.Div([
# ----- Client Pivot Table
html.Div([
# Pivot Table Header
html.H3(id='client-pivot-table-header',
children=dcc.Markdown(children='Tabla de Clientes'),
style={'color':colors['H3'],
'fontFamily':font_dict['H3'],
'textAlign':'center',
'padding':padding_dict['betweenGraphAndTable']}),

        # Client Pivot Table
        dash_table.DataTable(id='client-pivot-table',
                             data=pvt_client_df.to_dict("rows"),
                             columns=[{"name": i, "id": i} for i in pvt_client_df.columns],
                             style_header={'backgroundColor': 'silver',
                                           'fontWeight': 'bold',
                                           'textAlign': 'center'},
                             style_table={'maxHeight': max_table_height,
                                          'overflowY': 'scroll',
                                          'maxWidth': max_table_width,
                                          'padding':padding_dict['LeftMargin']},
                             style_cell={'minWidth': '0px', # min width of col
                                         'maxWidth': '100px',# max width of col
                                         'overflow':'hidden', #if text overflows col width, hide text
                                         #'whiteSpace': 'normal', #  "wrap text"
                                         'textOverflow':'ellipsis', # if overflow, show "..."
                                         'textAlign': 'center'},

                             style_cell_conditional=[{'if':{'row_index':'odd'},
                                                       'backgroundColor': colors['TableRows']},
                                                    {'if': {'column_id': "Cliente"},
                                                      'width': '35%',
                                                      'overflow':'hidden',
                                                      'textOverflow':'ellipsis',
                                                      'textAlign':'left'},
                                                     {"if": {"column_id": "$ Cotizado"},
                                                      'textAlign': 'right'}],
                             css=[{'selector': '.dash-cell div.dash-cell-value',
                                   'rule': 'display: inline; white-space: inherit; overflow: inherit;text-overflow: inherit;'}],
                             editable=False,
                             filtering=True,
                             sorting=True,
                             sorting_type="multi",
                             row_deletable=False,
                             selected_rows=[])
              ], className = "six columns"
    ),
    
    # ----- Supplier Pivot Table
    html.Div([
        # Pivot Table Header
        html.H3(id='supplier-pivot-table-header',
                children=dcc.Markdown(children='**Tabla de Suplidores**'),
                style={'color':colors['H3'],
                       'fontFamily':font_dict['H3'],
                       'textAlign':'center',
                       'padding':padding_dict['betweenGraphAndTable']}),
              
        # Supplier Pivot Table
        dash_table.DataTable(id='supplier-pivot-table',
                               data=pvt_supplier_df.to_dict("rows"),
                               columns=[{"name": i, "id": i} for i in pvt_supplier_df.columns],
                               style_header={'backgroundColor': 'silver',
                                           'fontWeight': 'bold',
                                           'textAlign': 'center'},
                               style_table={'maxHeight': max_table_height,
                                             'overflowY': 'scroll',
                                             'maxWidth': max_table_width,
                                             'padding':padding_dict['LeftMargin']},
                               style_cell={'minWidth': '0px', # min width of col 
                                           'textAlign': 'center',
                                           'maxWidth': '100px',# max width of col
                                           'overflow':'hidden',
                                           #'whiteSpace': 'normal', # "wrap text"
                                           'textOverflow':'ellipsis' # if overflow, show "..."
                                 },

                               style_cell_conditional=[{'if':{'row_index':'odd'},
                                                       'backgroundColor': colors['TableRows']},
                                                       
                                                       {'if': {'column_id': "Suplidor"},
                                                      'width': '35%',
                                                      'overflow':'hidden',
                                                      'textOverflow':'ellipsis',
                                                      'textAlign':'left'},
                                                       {"if": {"column_id": "$ Cotizado"},
                                                        'textAlign':'right'}],
                               css=[{'selector': '.dash-cell div.dash-cell-value',
                                     'rule': 'display: inline; white-space: inherit; overflow: inherit; text-overflow: inherit;'}],
                               editable=False,
                               filtering=True,
                               sorting=True,
                               sorting_type="multi",
                               row_deletable=False,
                               selected_rows=[])
                ], className = "six columns"
      )

], className = "row"
),

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions