---
title: "Comment by SteveC on \"Pagination and Searching in Salesforce Lightning Tree Grid\" | Hashnode"
description: "Hi - great thank you. I've found one issue when paging through a large amount of filtered data - and that's when using either the nextHandler - or previousHandl"
url: "https://hashnode.com/posts/pagination-and-searching-in-salesforce-lightning-tree-grid/665b0531ffbd084539cafa01/comment/67ebc6c6dd909a8fa2461cba"
---

[Discussion](https://hashnode.com/posts/pagination-and-searching-in-salesforce-lightning-tree-grid/665b0531ffbd084539cafa01)

Comment [Pagination and Searching in Salesforce Lightning Tree Grid](https://hashnode.com/posts/pagination-and-searching-in-salesforce-lightning-tree-grid/665b0531ffbd084539cafa01)

[SteveC](https://hashnode.com/@stevewc)

[Apr 1, 2025](https://hashnode.com/posts/pagination-and-searching-in-salesforce-lightning-tree-grid/665b0531ffbd084539cafa01/comment/67ebc6c6dd909a8fa2461cba)

Hi - great thank you. I've found one issue when paging through a large amount of filtered data - and that's when using either the nextHandler - or previousHandler - the filtered data resets to the full dataset. One solution is to make filteredItems within the filterData method a class property (this.filteredItems), declare it in the class, replace references of filterData with this.filterData and add this property as the optional parameter of the previousHandler and nextHandler methods.
