gregnb / gregnb/mui-datatables
Should I be able to pass a className to <MUIDataTable />?
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
I am passing a `className` string to a component. This works, but className is not documented as a prop, and is not present in the [TS types](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/mui-datatables/index.d.ts):
```typescript
export interface MUIDataTableProps {
columns: MUIDataTableColumnDef[];
data: Array;
options?: MUIDataTableOptions;
title: string | React.ReactNode;
}
```
If passing in className as a prop is officially supported, I would like to update the documentation and submit a PR to DefinitelyTyped.
My usecase is passing in a grid-area like so:
```jss
table: {
gridArea: 'table',
},
```
## Expected Behavior
Know whether passing a class to `` is supported, only accidentally working.
## Current Behavior
Passing a className to `` applies the JSS className.
## Steps to Reproduce (for bugs)
``
## Your Environment
"mui-datatables": "^2.15.0"
"@types/mui-datatables": "^2.14.2"
"react": "^16.13.0"
"typescript": "^3.9.2"
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the MUIDataTable prop handling and the linked types/mui-datatables/index.d.ts definition. Confirm with maintainers whether className is officially supported, then update the relevant documentation and TypeScript definition if approved. Done means the support status is documented and the type declaration matches it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- documentation, frontend
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100