mui-datatables
mui-datatables copied to clipboard
Not able to hide expander icon from specific rows
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: '[email protected]', showExpander: true }, { id: 2, name: 'Jane Doe', email: '[email protected]', showExpander: false }, { id: 3, name: 'Peter Jones', email: '[email protected]', 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 ( <DataTable data={data} expandableRows expandableRowsComponent={ExpandableTable} expandableRowsHideExpander={expandableRowsHideExpander} /> ); };