plotly / dash-table

OBSOLETE: now part of https://github.com/plotly/dash
https://dash.plotly.com
MIT License
420 stars 72 forks source link

filter box height is too small when 'height':'auto' is used for 'style_cell' #721

Open emmanuelle opened 4 years ago

emmanuelle commented 4 years ago

For example

import dash
import dash_table
import pandas as pd
import dash_html_components as html

df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')

app = dash.Dash(__name__)

app.layout = html.Div([dash_table.DataTable(
    id='table',
    columns=[{"name": i, "id": i} for i in df.columns],
    data=df.to_dict('records'),
    filter_action="native",
    style_cell={
                    'height': 'auto', 'minHeight': '30px',
                    'minWidth': '0px', 'maxWidth': '10px',
                    'whiteSpace': 'normal'
                },

    )], style={'width':'30%'})

if __name__ == '__main__':
    app.run_server(debug=True)

image

In the image above, the filter line (just below the header) has a very small height, almost 0.

emmanuelle commented 4 years ago

This can be fixed by setting style_filter = {'height':'50px'}.

chriddyp commented 4 years ago

Seems like something where we could be setting the default for style_filter?