gregnb / gregnb/mui-datatables
Should textLabels options be able to return an element?
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I'm using the textLabels option to provide localized translations. In one of the text labels, I actually return a React element, and this works:
```
textLabels: {
...
body: {
noMatch:
condition ? (
) : (
),
},
...
}
```
I'd like some clarification on whether this is supported. Both the documentation and the TypeScript types say no, but if that isn't intentional, this could be a really great feature.
## Expected Behavior
textLabels should be strings
## Current Behavior
textLabels can be strings or elements
## Steps to Reproduce (for bugs)
See above example
## Your Environment
"mui-datatables": "^2.11.1",
"@types/mui-datatables": "^2.12.2",
"react-dom": "^16.12.0",
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the textLabels documentation and TypeScript definitions with the React-element example in the issue. Reproduce the shown configuration, then establish whether supported behavior, documentation, and types should agree; done means the support decision is explicit and those surfaces are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100