1.0.3 • Published 12 months ago

filter-tree-list v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

Filter Tree Array List

🎉 Filter tree list by key and expression function

Demo demo

npm bundle size npm

Install

  • NPM: npm i filter-tree-list
  • YARN: yarn add filter-tree-list

Usage

Import filterTreeList to your working files

import { arrayTreeFilter } from 'filter-tree-list';

 let records = arrayTreeFilter<TreeModel>(
        this.datasource,
        (x => x.title.toLowerCase().includes('foo')),
        {
          childrenKeyName: 'nodes'
        }
      );
  • this.datasource: is your tree source
  • (x => x.title.toLowerCase().includes('foo')): second parameter is your filter condition
  • {childrenKeyName: 'nodes'} : this option is key name of tree source - default value is: children

Author

💻Mohammadreza samani | FrontEnd Developer

❤️Buy me a coffee 😉

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago