Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

Changing the text of the Dash Table filter prompt

I have been working on creating a graphing software in dash that uses the dash_table component to see and sort through the data on a more granular scale than the graphs them selves. However, I have run into an issue with the built in filtering tools. The application I am building has to be able to work in both English and French so I would need to be able to change the text prompt from ‘filter data’ to another option when the application is used in French.

image

I have a similar issue with the ‘Toggle Columns’ button that appears when columns are hideable but I have found a work around using CSS.

Below is my code for the table

graph = dash_table.DataTable(
            id={'type': 'datatable', 'index': tile},
            columns={"name": get_label(i), "id": i, "hideable": True},

            page_current=0,
            page_size=25,
            page_action="custom",

            filter_action='custom',
            filter_query='',

            sort_action='custom',
            sort_mode='multi',
            sort_by=[],

            cell_selectable=False,

            style_data_conditional=[
                {
                    'if': {'row_index': 'odd'},
                    'backgroundColor': 'rgb(248, 248, 248)'
                }
            ],
            style_header={
                'backgroundColor': 'rgb(230, 230, 230)',
                'fontWeight': 'bold'
            },
            style_table={'margin': '10px', 'height': '100%', 'width': '100%', 'overflow-y': 'auto',
                         'overflow-x': 'auto'},

            css=[{"selector": ".show-hide", "rule": "innerText: 'Text'"}]

        )

If anyone knows of any ways to change this built in text I would very much appreciate it.

Thank you