gregnb / gregnb/mui-datatables
Can you bind the value of a column to a boolean property?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 905
- PR merge metrics
- No merged PRs in 30d
Description
Should I be able to bind a column directly to a boolean property like this?
const columns: MUIDataTableColumn[] = [
{
name: 'name',
label: 'I am a string',
},
{
name: 'isPrimary',
label: 'I am a boolean',
},
];
Because when I do that, the column has blanks. If I map my object so that isPrimary is a string (Y,N) then they appear.
Also, when binding to a boolean, the filter select correctly shows All, True, False but when I select True, the little chip above the grid is empty.
So basically, can you not bind direct to a boolean?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the column definitions and boolean data shown in the report, then trace the table rendering and filter-chip behavior. Done means boolean values display in the column and the selected True or False filter is represented by a non-empty chip.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100