---
title: "Discussion on \"Pagination and Searching in Salesforce Lightning Tree Grid\" | Hashnode"
description: "Discussion on \"Pagination and Searching in Salesforce Lightning Tree Grid\". In Salesforce Lightning, the Lightning Tree Grid component offers a powerful way to display hierarchical data with rich features. However, implementing pagination and searching within the Lightning Tree Grid can enhance its usability and efficiency. ..."
url: "https://hashnode.com/posts/pagination-and-searching-in-salesforce-lightning-tree-grid/665b0531ffbd084539cafa01"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Pagination and Searching in Salesforce Lightning Tree Grid](https://forcedev.hashnode.dev/pagination-and-searching-in-salesforce-lightning-tree-grid?utm_source=hashnode&utm_medium=feed)

In Salesforce Lightning, the Lightning Tree Grid component offers a powerful way to display hierarchical data with rich features. However, implementing pagination and searching within the Lightning Tree Grid can enhance its usability and efficiency. ...

Jun 1, 2024 · 4 min read · forcedev.hashnode.dev  
Updated Oct 6, 2024  
Read the article

-   [#salesforce](https://hashnode.com/tag/salesforce)
-   [#salesforce-development](https://hashnode.com/tag/salesforce-development)
-   [#salesforce-developer](https://hashnode.com/tag/salesforce-developer)
-   [#salesforce-crm](https://hashnode.com/tag/salesforce-crm)
-   [#lwc](https://hashnode.com/tag/lwc)
-   [#lightning-web-components](https://hashnode.com/tag/lightning-web-components)
-   [#lightningtreegrid](https://hashnode.com/tag/lightningtreegrid)
-   [#pagination](https://hashnode.com/tag/pagination)

## Written by

[Harsh Verma](https://hashnode.com/@sforcedev)

@sforcedev

  
[View profile](https://hashnode.com/@sforcedev)

Elevate Experiences, Unleash Innovation: Crafting Tomorrow with Salesforce and Vlocity Developers.

## Responses 1

Markdown supported · ⌘↵ to post

[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.
