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.

[Bug] Conflict between (fixed_rows & fixed_columns used together) and filter_action = 'native' #835

@Dekermanjian

Description

@Dekermanjian

When fixed_rows and fixed_columns are used together and you filter the table with a query that does not exist in that particular column the resulting filtered table gets distorted.

import dash
import dash_table
import pandas as pd

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

app = dash.Dash(__name__)

app.layout = dash_table.DataTable(
    id='table',
    columns=[{"name": i, "id": i} for i in df.columns],
    data=df.to_dict('records'),
    filter_action  = 'native',
    fixed_columns = {'headers':True, 'data':1},
    fixed_rows = {'headers':True, 'data':0},
    style_header={'fontWeight': 'bold','border': 'thin lightgrey solid','backgroundColor': 'rgb(100, 100, 100)','color': 'white', 'minWidth':'100%', 'maxWidth':'100%'},
    style_cell={'fontFamily': 'Open Sans','textAlign': 'left','width': '150px','minWidth': '100%','maxWidth': '100%','whiteSpace': 'no-wrap','overflow': 'visible','textOverflow': 'wrap'},
    style_table = {'overflowX':'scroll', 'overflowY':'scroll', 'minWidth':'100%', 'maxHeight':'400px', 'maxWidth':'100%'}
)

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

before filtering for the value 0 as shown in the image
Screen Shot 2020-10-06 at 8 48 46 AM

And this is after hitting the return key to filter for values of 0, which do not exist in that column
Screen Shot 2020-10-06 at 8 48 54 AM

I am using the latest version of Dash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions