Skip to content

Commit

Permalink
updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
syedsalehinipg committed Feb 14, 2024
1 parent 62093c9 commit 1631e11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/TreeViewList/TreeViewList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@ const TooltipTreeItem = (
);
};

// function to filter the items to contain only those that match the search term
/**
* Filter items to contain only those that match the searchTerm
* @param items - The items to filter.
* @param searchTerm - The search term to match.
* @returns The filtered items.
* @example filterBySearchTerm(items, "search term");
*/
const filterBySearchTerm = (items: TreeNodeItem[], searchTerm: string) => {
// take a copy of the items array to avoid mutating the original
const itemsCopy = JSON.parse(JSON.stringify(items)) as TreeNodeItem[];
Expand Down

0 comments on commit 1631e11

Please sign in to comment.