Data Table - Not Interacting


I cannot figure out why my data table is not interactive. I am looking for it to be capable of both sorting and filtering. Also, the next and previous buttons don’t work.

                                                columns=[{"name": i, "id": i} for i in df.columns],
                                                                         {'if':{'column_id':'Work Order'},
                                                                         {'if':{'column_id':'Part Number'},
                                                                         {'if':{'column_id':'Serial Numbers'},
                                                                         {'if':{'column_id':'Arrival Date'},
                                                                         {'if':{'column_id':'Need Date'},
                                                                         {'if':{'column_id':'Test Date'},
                                                                         {'if':{'column_id':'Test ID'},

Any help is appreciated.


There is a bug in data table for which it needs to be connected to a callback to become interactive. Just link it to a bogus callback that does not do much and you will be ok.

Thanks for the reply! I’ve added a pointless callback and it partially worked. I am able to sort, but not filter. Any other suggestions?

#Pointless Callback to make table interact - literally does nothing.
    Output('table-container', "children"),
    [Input('table', "derived_virtual_data"),
     Input('table', "derived_virtual_selected_rows")])
def update_graph(rows, derived_virtual_selected_rows):
    return html.Div([])

Filtering syntax is super awkward, you need to do: eq "foo" for strings and > num(0) for numbers. It’s common to just want to type: foo and expect everything that contains "foo" will be filtered. Make sure you’re not making this mistake.

There’s an issue on this topic:

While, I was making this error it did not fix everything. I have a column that is formatted as a string but some of those strings are formed from numbers such as 95607. Neither =“95607” nor =num(95607) works. Some columns are searchable via these methods…

FYI, for strings you need eq "95607" not ="95607"

Not true. =“string” works fine.

Good to hear, but it isn’t documented:

Thanks for the help! And if you have any ideas for making a string made up of numeric characters filterable, I am all ears.