Skip to content

feat(CdkTable): There should be a way to access CdkTable's _renderRows #28468

Open
@ahmed-dardery

Description

@ahmed-dardery

Feature Description

The property _renderRow, which is a private property on CdkTable represent the currently rendered rows in the table. This is very convenient for accessing information about what's visible, which is some times more convenient than querying the dataSource.

Suggestion is something like:
private _renderRows: RenderRow<T>[]; get renderedRows() { return _renderRows }
Could also return a readonly version.

Use Case

Interested in having a "expand all / collapse all" button in the header of the table, which ideally should only loop over the rows that are currently visible to access their .data.expanded value. After which it can be changed to expand all or collapse all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/tablefeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions