plotly / dash-table

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

Configurable client side search bar? #389

Open Buuntu opened 5 years ago

Buuntu commented 5 years ago

Is there an option to add a user-friendly client-side search bar? It would be nice to have an option to just add an input field that searches all columns for whatever string is typed in (without having to type eq "example" on the certain column). Shiny for R has this ability built in to its data tables. I think this would be great if it were part of the normal functionality.

It seems like the only way to do this currently is to add an extra input field and then manually filter the results through a callback (I'm not sure if that would happen on the client or server)?

Also, for the paging option, it would be great if there were page numbers by default. Currently you only have the option to go Next and Back (one by one), without knowing where you are exactly.

Marc-Andre-Rivet commented 5 years ago

@Buuntu Thanks for the suggestions. Will cross-link this with the filtering epic and the general ui improvements issue for future reference.

It seems like the only way to do this currently is to add an extra input field and then manually filter the results through a callback (I'm not sure if that would happen on the client or server)?

The callback could also send back the filter string directly to the table's 'filtering_settings' prop for direct use but it is pretty unforgiving as-is.

@app.callback(
  Output('my-table', 'filtering-settings'),
  [Input('my-input', 'value')]
)
def update_filter(filter):
  return filter