Skip to content

Releases: VadimDez/ngx-filter-pipe

2.1.2

19 Sep 21:21
Compare
Choose a tag to compare

Improvements

  • [#65] - Filter by two variables didn't work
  • [#69] - fix filter with multiple fields

Now $or can filter with multiple predicates

class AppComponent {
  objects = [
    { name: 'John' },
    { firstName: 'John' }
  ];
  
  constructor(private filter: FilterPipe) {
    let result = this.filter.transform(this.objects, { $or: [{ name: 'John' }, { firstName: 'John' }] });
    console.log(result); // [{ name: 'John' }, { firstName: 'John' }]
  }
}

2.1.1

18 Sep 18:18
Compare
Choose a tag to compare

Fixes

  • [#67] - Filtering Array with null Nested Objects
  • [#68] - fix filter when nested object is null

2.1.0

18 Feb 20:02
Compare
Choose a tag to compare

Improvements

  • [#55] - Made pipe impure to detect changes in arrays and objects
  • [#54] - Change detection not firing with object

2.0.0

08 Feb 22:30
Compare
Choose a tag to compare

Improvements

  • [#51] - Restructure
  • [#42] - AOT support
  • [#44] - Angular 5

Breaking change

Bundle location is changed, therefore SYSTEMJS config should be updated

Append to map

var map = {
    ...
    'ngx-filter-pipe': 'node_modules/ngx-filter-pipe/bundles'
}

and then add to packages

var packages = {
    ...
    'ngx-filter-pipe': { defaultExtension: 'js' }
}

1.0.2

03 Feb 19:25
Compare
Choose a tag to compare

Improvements

  • [#50] - How to call filterPipe transform from Component ?

Use FilterPipe in a component

Inject FilterPipe into your component and use it:

class AppComponent {
  objects = [
    { name: 'John' },
    { name: 'Nick' },
    { name: 'Jane' }
  ];
  
  constructor(private filter: FilterPipe) {
    let result = this.filter.transform(this.objects, { name: 'J' });
    console.log(result); // [{ name: 'John' }, { name: 'Jane' }]
  }
}

1.0.1

18 Dec 17:37
Compare
Choose a tag to compare

Fixes

  • [#46] - Filter by property/method on prototype chain.
  • [#47] - walk the prototype chain to check if field/property exists.

1.0.0

22 Jun 19:12
Compare
Choose a tag to compare

Changes

  • [#36] - Changed name tp ngx-filter-pipe.
  • [#38] - Added UMD bundle.

Breaking changes

  • Module name was changed from Ng2FilterPipeModule to FilterPipeModule.
  • UMD bundle for SYSTEMJS was added. Use /dist/bundles/ngx-filter-pipe.umd.js instead of /dist/index.js.
var packages = {
    ...
    'ngx-filter-pipe': { main: 'dist/bundles/ngx-filter-pipe.umd.js' }
}

0.1.10

01 Jun 10:56
Compare
Choose a tag to compare

Features

  • [#31] - How to filter by two variables of the same array.
  • [#4] - Add $or operator.

0.1.9

27 May 13:23
Compare
Choose a tag to compare

Fixes

  • [#32] - Filter fails when filter value is zero

0.1.8

20 Apr 20:48
Compare
Choose a tag to compare

Fixes

  • Removed warning in Angular 4