如何为 material-table 编写自定义 select/checkmark 逻辑,以在嵌套的 material-table 详细信息面板中包含选定的行

How to write custom select/checkmark logic for material-table, to include selected rows inside of detail panel nested material-table

我现在有一个 material-table component where I am rendering a nested materiel-table in the detail panel of each row. I would like to know if there is a way to include detail panel material-table rows in the functions offered by the package. I am mainly interested in the selection 功能,但可能需要对过滤、搜索等其他功能的相同支持...

现在我知道 Tree Data 允许这样做,因为所有行都是相同 table 的一部分。但我需要能够使用详细信息面板来完成。

注意:为了更清楚,here is a code sandbox 我发现了嵌套的 table 功能。

那么如何将他们的自定义 select 函数添加到 material-table,例如在嵌套 [=26] 中包含 selected 行=]-tables ?

在 table 之外控制行选中状态的方法,即不使用提供的复选框输入,在我在 material-table-core repo. It's pretty straight forward and should help anyone trying to do the same : https://material-table-core.com/demos/selection/outside-of-table/ 中提出相同问题后创建的演示中进行了演示