gregnb / gregnb/mui-datatables

filterOptions should accept an object

Open
#489 2 comments 2 reactions 0 assignees View on GitHub
needs verification
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

## Expected Behavior
`filterOptions` should also accept an object for dropdowns.

## Current Behavior
Right now we can only provide an array for `filterOptions`. This might be okay for client-side filtering but we could also use an object for server-side filtering cases.

```
filterOptions: { enum_1: "Enum 1", enum_2: "Enum 2" } // Render "Enum 1"
...
onTableChange: (action, tableState) // At this point I prefer to get "enum_1" value
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.