Skip to content

[Table] Expose paginated data on MatTableDataSource #9419

@oktav777

Description

@oktav777

Bug, feature request, or proposal:

feature request

What is the expected behavior?

MatTableDataSource should provide a method to get currently rendered data which is filtered, sorted and paginated.

What is the current behavior?

At the moment I couldn't find the right way to get rendered data(It may exist but it's not documented).

What are the steps to reproduce?

--

What is the use-case or motivation for changing an existing behavior?

I have found a hacky way to get currently rendered data on the table page.
The data is filtered, sorted, and paginated, so I have to get the currently visible data, for let's say row selection's page toggle(clicking it will select all filtered and sorted data on the current table page).

I'm using this.dataSource['_renderData']['value'], but the problem is that, _renderData is a private property of type BehaviorSubject. So accessing data in this way doesn't look good.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

latest

Is there anything else we should know?

--

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/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