Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] filteredData not sorted when no filter used #203

Open
spali opened this issue Jul 14, 2021 · 0 comments
Open

[Bug] filteredData not sorted when no filter used #203

spali opened this issue Jul 14, 2021 · 0 comments

Comments

@spali
Copy link

spali commented Jul 14, 2021

What is the expected behavior?

filteredData should be always sorted, even if data is not filtered.

What is the current behavior?

if no filter used, filteredData should return the same array as sortedData.

What are the steps to reproduce?

  1. Simple table with matSort.
  2. Sort any column.
  3. dump sortedData and filteredData to the console.

sortedData matches the rendered table. filteredData has the contains the unsorted datasource.

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

angular: 12.0
ngrid: 4.0.0-alpha.3

Is there anything else we should know?

Currently I workaroud by accessing like:

            const data =
              this.grid.ds.filter !== undefined
                ? this.grid.ds.filteredData
                : this.grid.ds.sortedData;

If this is by design, do not hesitate closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant