bogdan / datagrid

Gem to create tables grids with sortable columns and filters
MIT License
1.02k stars 115 forks source link

Ability to set filter value programmatically #323

Closed jkaufman closed 7 months ago

jkaufman commented 7 months ago

I'm trying to restore persisted user settings when the grid is initialized, including visible columns and filter settings. I'm uncertain of how to set either column_names or the status of a boolean filter, e.g. "Active". I am unable to rely on filter defaults because the current user is only passed with grid initialization.

I suspect that this is a common use case and that I've missed something in the docs. Thank you.

EDIT: I can pass attributes to the grid!