Skip to content

Feature request - expose filteredSortedData as a public API #1432

@tkiryu

Description

@tkiryu

Description

Could you expose filteredSortedData as a public API?

Problem

Currently, in order to get dataview(which means filtered and sorted data) of igx-grid, we have to use two APIs, filteredData and IgxGridSortingPipe.

I'm implementing as below to achieve that. But It's a little bother.

  @ViewChild('grid') grid: IgxGridComponent;
  constructor(
    private gridSort: IgxGridSortingPipe,
  ) {}

  getDataView(): any[] {
      const data = this.grid.filteredData ? this.grid.filteredData : this.grid.data;
      const dataView = this.gridSort.transform(data, this.grid.sortingExpressions, this.grid.id, this.grid.pipeTrigger);
      return dataView;
  }

Expect

After implementing, I found that filteredSortedData is doing almost the same as I do.
filteredSortedData public API would save us a lot of time and be very convenient.

I'd appreciate your consideration.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions