gregnb / gregnb/mui-datatables

Not able to hide expander icon from specific rows

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

Description

I am using react datatable version 7.5..The issue is that I am not able to hide the expander button from my rows..here is my code
const data = [
{ id: 1, name: 'John Doe', email: 'johndoe@example.com', showExpander: true },
{ id: 2, name: 'Jane Doe', email: 'janedoe@example.com', showExpander: false },
{ id: 3, name: 'Peter Jones', email: 'peterjones@example.com', showExpander: true },
];

const ExpandableTable = () => {
return (


Additional Details


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra facilisis.



);
};

const App = () => {
const expandableRowsHideExpander = (row) => {
return !row.showExpander;
};

return (

);
};

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the DataTable entry point and inspect how the expandableRowsHideExpander prop is applied to each row. Reproduce the supplied example with the three rows and verify that rows with showExpander set to false hide the expander while the others retain it; the issue is done when that behavior works in React DataTable 7.5.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.