question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table expanded row props

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

more flexibility for expandable rows

What does the proposed API look like?

table have expandedRowProps - Function(record, index):Object - where more features can be supported. Example use cases:

  • Some rows are expandable and some are not, expandedRowProps(record).expandable // false
  • Expanded row fetches record details on open, so closing and reopening triggers fetching the data, expandedRowProps(record).destroyOnClose // true
  • Instead of passing multiple props for the expanded rows to the table (expandedRowKeys, expandedRowRender, expandRowByClick) now the can be grouped in one function
  key: 1,
  expanded: true,
  expandByClick: false
})```

P.S. I love your work, and I rely on it heavily on all my project. I do realize how much effort you did put, and still are putting into it. Thank you very much for  this magnificent framework


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
yesmeckcommented, May 9, 2018

@AhmedSayed77 I’ve realized that’s not a good idea, I’ll add expanded as the fourth parameter to expandedRowRender, so that you can:

<Table expandedRowRender={(record, index, indent, expaned) => expaned ? <MyComponent /> : null)} />
1reaction
yesmeckcommented, May 8, 2018

You can trigger remount by giving a random key to your expanded component:

<Table expandedRowRender={() => <MyComponent key={Date.now()} />} />
Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing React table expanded rows - Stack Overflow
Implementing React table expanded rows · import { useTable, useGlobalFilter, useFilters, usePagination, useSortBy, useRowSelect, useExpanded, } ...
Read more >
Expanding | TanStack Table Docs
Returns a function that can be used to toggle the expanded state of the row. This function can be used to bind to...
Read more >
Row Expand Props · react-bootstrap-table2
expandRow.expanded is useful to manage the row expand on table, for example: you can use it to perform the default expands. const ...
Read more >
react-table-expand-rows - CodeSandbox
CodeSandbox is an online editor tailored for web applications.
Read more >
A simple table library with built in expandable rows and ...
expandableRowsComponent, string or component, no, A custom component to display in the expanded row. It will have the data prop composed so ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found